pub struct CreateRepoBody {
pub description: Option<String>,
pub name: String,
pub visibility: Option<RepoVisibilityInput>,
}Expand description
Request body for POST /api/v1/u/{owner}/repos.
Creates a repository owned by the authenticated user. The (owner, name) pair must be unique; collisions return 409.
JSON schema
{
"description": "Request body for `POST /api/v1/u/{owner}/repos`.\n\nCreates a repository owned by the authenticated user. The (owner,\nname) pair must be unique; collisions return 409.",
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"description": "Optional short description shown next to the repo name in\nlistings. Free-form; no length cap.",
"type": [
"string",
"null"
]
},
"name": {
"description": "Repository name. Must be unique among the authenticated user's\nexisting repos. Used as the URL slug at\n`/api/v1/u/{owner}/repos/{repo}`.",
"type": "string"
},
"visibility": {
"description": "Initial visibility. Defaults to `public` if omitted. The\n`unlisted` state is not accepted on repos — it's reserved for\nthe system-managed pathstash repo and seeded directly in the DB.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/RepoVisibilityInput"
}
]
}
]
}
},
"additionalProperties": false
}Fields§
§description: Option<String>Optional short description shown next to the repo name in listings. Free-form; no length cap.
name: StringRepository name. Must be unique among the authenticated user’s
existing repos. Used as the URL slug at
/api/v1/u/{owner}/repos/{repo}.
visibility: Option<RepoVisibilityInput>Initial visibility. Defaults to public if omitted. The
unlisted state is not accepted on repos — it’s reserved for
the system-managed pathstash repo and seeded directly in the DB.
Trait Implementations§
Source§impl Clone for CreateRepoBody
impl Clone for CreateRepoBody
Source§fn clone(&self) -> CreateRepoBody
fn clone(&self) -> CreateRepoBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateRepoBody
impl Debug for CreateRepoBody
Source§impl<'de> Deserialize<'de> for CreateRepoBody
impl<'de> Deserialize<'de> for CreateRepoBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateRepoBody
impl RefUnwindSafe for CreateRepoBody
impl Send for CreateRepoBody
impl Sync for CreateRepoBody
impl Unpin for CreateRepoBody
impl UnsafeUnpin for CreateRepoBody
impl UnwindSafe for CreateRepoBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more