[][src]Struct gitlab::api::projects::repository::files::CreateFileBuilder

pub struct CreateFileBuilder<'a> { /* fields omitted */ }

Builder for CreateFile.

Implementations

impl<'a> CreateFileBuilder<'a>[src]

pub fn project<VALUE: Into<NameOrId<'a>>>(&mut self, value: VALUE) -> &mut Self[src]

The project to create a file within.

pub fn file_path<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The path to the file in the repository.

This is automatically escaped as needed.

pub fn branch<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self[src]

The branch to use for the new commit.

pub fn content<VALUE: Into<Cow<'a, [u8]>>>(&mut self, value: VALUE) -> &mut Self[src]

The content of the new file.

This will automatically be encoded according to the encoding parameter.

pub fn commit_message<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The commit message to use.

pub fn start_branch<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Where to start the branch from (if it doesn't already exist).

pub fn encoding<VALUE: Into<Encoding>>(&mut self, value: VALUE) -> &mut Self[src]

The encoding to use for the content.

Note that if text is requested and content contains non-UTF-8 content, a warning will be generated and a binary-safe encoding used instead.

pub fn author_email<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The email of the author for the new commit.

pub fn author_name<VALUE: Into<Cow<'a, str>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The name of the author for the new commit.

pub fn build(&self) -> Result<CreateFile<'a>, String>[src]

Builds a new CreateFile.

Errors

If a required field has not been initialized.

Trait Implementations

impl<'a> Clone for CreateFileBuilder<'a>[src]

impl<'a> Default for CreateFileBuilder<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for CreateFileBuilder<'a>

impl<'a> Send for CreateFileBuilder<'a>

impl<'a> Sync for CreateFileBuilder<'a>

impl<'a> Unpin for CreateFileBuilder<'a>

impl<'a> UnwindSafe for CreateFileBuilder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.