#[non_exhaustive]pub struct RepoSpec {
pub resource: Resource,
pub visibility: Visibility,
pub description: Option<String>,
pub owners: Vec<ForgeAccount>,
}Expand description
A repository to create (§5.2 git-ns/repo/create).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resource: ResourceThe full resource, host/owner/name.
visibility: VisibilityVisibility.
description: Option<String>Optional description.
owners: Vec<ForgeAccount>The repository’s owners (git.repo.own holders) with linked forge
accounts — who may approve changes to its workflows where the forge
guards them with owner review (§9).
Implementations§
Source§impl RepoSpec
impl RepoSpec
Sourcepub fn with_owner(self, owner: ForgeAccount) -> Self
pub fn with_owner(self, owner: ForgeAccount) -> Self
Add an owner.
Sourcepub fn with_visibility(self, visibility: Visibility) -> Self
pub fn with_visibility(self, visibility: Visibility) -> Self
Set the visibility.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RepoSpec
impl<'de> Deserialize<'de> for RepoSpec
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
impl Eq for RepoSpec
impl StructuralPartialEq for RepoSpec
Auto Trait Implementations§
impl Freeze for RepoSpec
impl RefUnwindSafe for RepoSpec
impl Send for RepoSpec
impl Sync for RepoSpec
impl Unpin for RepoSpec
impl UnsafeUnpin for RepoSpec
impl UnwindSafe for RepoSpec
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