Enum scm_record::SelectedContents
source · pub enum SelectedContents<'a> {
Absent,
Unchanged,
Binary {
old_description: Option<Cow<'a, str>>,
new_description: Option<Cow<'a, str>>,
},
Present {
contents: String,
},
}
Expand description
The contents of a file selected as part of the record operation.
Variants§
Absent
The file didn’t exist or was deleted.
Unchanged
The file contents have not changed.
Binary
The file contains binary contents.
Fields
Present
The file contained the following text contents.
Trait Implementations§
source§impl<'a> Clone for SelectedContents<'a>
impl<'a> Clone for SelectedContents<'a>
source§fn clone(&self) -> SelectedContents<'a>
fn clone(&self) -> SelectedContents<'a>
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<'a> Debug for SelectedContents<'a>
impl<'a> Debug for SelectedContents<'a>
source§impl<'a> Hash for SelectedContents<'a>
impl<'a> Hash for SelectedContents<'a>
source§impl<'a> Ord for SelectedContents<'a>
impl<'a> Ord for SelectedContents<'a>
source§fn cmp(&self, other: &SelectedContents<'a>) -> Ordering
fn cmp(&self, other: &SelectedContents<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq for SelectedContents<'a>
impl<'a> PartialEq for SelectedContents<'a>
source§fn eq(&self, other: &SelectedContents<'a>) -> bool
fn eq(&self, other: &SelectedContents<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for SelectedContents<'a>
impl<'a> PartialOrd for SelectedContents<'a>
source§fn partial_cmp(&self, other: &SelectedContents<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &SelectedContents<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Eq for SelectedContents<'a>
impl<'a> StructuralPartialEq for SelectedContents<'a>
Auto Trait Implementations§
impl<'a> Freeze for SelectedContents<'a>
impl<'a> RefUnwindSafe for SelectedContents<'a>
impl<'a> Send for SelectedContents<'a>
impl<'a> Sync for SelectedContents<'a>
impl<'a> Unpin for SelectedContents<'a>
impl<'a> UnwindSafe for SelectedContents<'a>
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more