Struct gitlab::api::projects::repository::commits::CommitActionBuilder
source · pub struct CommitActionBuilder<'a> { /* private fields */ }
Expand description
Builder for CommitAction
.
Implementations§
source§impl<'a> CommitActionBuilder<'a>
impl<'a> CommitActionBuilder<'a>
sourcepub fn action(&mut self, value: CommitActionType) -> &mut Self
pub fn action(&mut self, value: CommitActionType) -> &mut Self
The action to perform.
sourcepub fn file_path<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn file_path<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
The path to the file.
sourcepub fn previous_path<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn previous_path<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
Original full path to the file being moved.
Only considered for Move
action.
sourcepub fn content<VALUE: Into<Cow<'a, [u8]>>>(&mut self, value: VALUE) -> &mut Self
pub fn content<VALUE: Into<Cow<'a, [u8]>>>(&mut self, value: VALUE) -> &mut Self
File content, required for Create
and Update
.
Move actions that do not specify content preserve the existing file content and any other value of content overwrites the file content.
This will automatically be encoded according to the encoding
parameter.
sourcepub fn encoding(&mut self, value: Encoding) -> &mut Self
pub fn encoding(&mut self, value: Encoding) -> &mut Self
The encoding to use for the content, text is default.
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.
sourcepub fn last_commit_id<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn last_commit_id<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
Last known file commit ID.
Only considered in Update
, Move
, and Delete
actions.
sourcepub fn execute_filemode(&mut self, value: bool) -> &mut Self
pub fn execute_filemode(&mut self, value: bool) -> &mut Self
When true/false enables/disables the execute flag on the file.
Only considered for the Chmod
action.
sourcepub fn build(&self) -> Result<CommitAction<'a>, CommitActionBuilderError>
pub fn build(&self) -> Result<CommitAction<'a>, CommitActionBuilderError>
Trait Implementations§
source§impl<'a> Clone for CommitActionBuilder<'a>
impl<'a> Clone for CommitActionBuilder<'a>
source§fn clone(&self) -> CommitActionBuilder<'a>
fn clone(&self) -> CommitActionBuilder<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more