pub struct FileToWrite<'a> {
pub relative_path: &'a Path,
pub content: &'a str,
pub old_content: Option<&'a str>,
}Expand description
Service for common Git operations on a repository rooted at workdir.
This bundles the repository handle and its workdir to make workflows like “initialise repo then commit files” ergonomic at call sites. Represents a file to be written and committed.
Used with VersionedFileService::write_and_commit_files to write multiple files
in a single atomic commit operation.
Fields§
§relative_path: &'a PathThe relative path to the file within the repository directory.
content: &'a strThe new content to write to the file.
old_content: Option<&'a str>The previous file content for rollback. None if this is a new file.
Trait Implementations§
Source§impl<'a> Clone for FileToWrite<'a>
impl<'a> Clone for FileToWrite<'a>
Source§fn clone(&self) -> FileToWrite<'a>
fn clone(&self) -> FileToWrite<'a>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'a> Freeze for FileToWrite<'a>
impl<'a> RefUnwindSafe for FileToWrite<'a>
impl<'a> Send for FileToWrite<'a>
impl<'a> Sync for FileToWrite<'a>
impl<'a> Unpin for FileToWrite<'a>
impl<'a> UnwindSafe for FileToWrite<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request