pub struct CreateRepoBuilder { /* private fields */ }
Expand description
Represents the options for creating a new repository.
The only required field is name
.
Implementations§
Source§impl CreateRepoBuilder
impl CreateRepoBuilder
Sourcepub fn auto_init(self, auto_init: impl Into<bool>) -> Self
pub fn auto_init(self, auto_init: impl Into<bool>) -> Self
Whether the repository should be automatically initialized. This will create a README, LICENSE, and .gitignore file.
Sourcepub fn default_branch(self, default_branch: impl Into<String>) -> Self
pub fn default_branch(self, default_branch: impl Into<String>) -> Self
Default branch of the repository.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Description of the repository.
Sourcepub fn gitignores(self, gitignores: impl Into<String>) -> Self
pub fn gitignores(self, gitignores: impl Into<String>) -> Self
Optional Gitignore templates to use.
Will be ignored if auto_init
is false.
Sourcepub fn issue_labels(self, issue_labels: impl Into<String>) -> Self
pub fn issue_labels(self, issue_labels: impl Into<String>) -> Self
Optional Issue label-set to use.
Sourcepub fn object_format_name(
self,
object_format_name: impl Into<ObjectFormatName>,
) -> Self
pub fn object_format_name( self, object_format_name: impl Into<ObjectFormatName>, ) -> Self
Object Format Name of the underlying git repository.
Sourcepub fn readme(self, readme: impl Into<String>) -> Self
pub fn readme(self, readme: impl Into<String>) -> Self
Optional README template to use.
Will be ignored if auto_init
is false.
Sourcepub fn trust_model(self, trust_model: impl Into<TrustModel>) -> Self
pub fn trust_model(self, trust_model: impl Into<TrustModel>) -> Self
Trust model for verifying commits in the repository.
Source§impl CreateRepoBuilder
impl CreateRepoBuilder
pub fn new(org: impl ToString, name: impl ToString) -> Self
Sourcepub async fn send(&self, client: &Client) -> Result<Repository>
pub async fn send(&self, client: &Client) -> Result<Repository>
Send the request to create the repository. This will return the created Repository.
Trait Implementations§
Source§impl Clone for CreateRepoBuilder
impl Clone for CreateRepoBuilder
Source§fn clone(&self) -> CreateRepoBuilder
fn clone(&self) -> CreateRepoBuilder
Returns a copy of the value. Read more
1.0.0 · 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 CreateRepoBuilder
impl Debug for CreateRepoBuilder
Source§impl PartialEq for CreateRepoBuilder
impl PartialEq for CreateRepoBuilder
Source§impl Serialize for CreateRepoBuilder
impl Serialize for CreateRepoBuilder
impl StructuralPartialEq for CreateRepoBuilder
Auto Trait Implementations§
impl Freeze for CreateRepoBuilder
impl RefUnwindSafe for CreateRepoBuilder
impl Send for CreateRepoBuilder
impl Sync for CreateRepoBuilder
impl Unpin for CreateRepoBuilder
impl UnwindSafe for CreateRepoBuilder
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