pub enum EntryRef<'a> {
File(FileRef<'a>),
Directory(DirectoryRef<'a>),
Tombstone(TombstoneRef<'a>),
}
Expand description
Info about a directory entry.
Variants§
Implementations§
Source§impl<'a> EntryRef<'a>
impl<'a> EntryRef<'a>
pub fn name(&self) -> &'a str
pub fn version_vector(&self) -> &'a VersionVector
pub fn file(self) -> Result<FileRef<'a>>
pub fn directory(self) -> Result<DirectoryRef<'a>>
pub fn is_file(&self) -> bool
pub fn is_directory(&self) -> bool
pub fn is_tombstone(&self) -> bool
pub fn branch_id(&self) -> &PublicKey
pub fn parent(&self) -> &Directory
Trait Implementations§
impl<'a> Copy for EntryRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for EntryRef<'a>
impl<'a> !RefUnwindSafe for EntryRef<'a>
impl<'a> Send for EntryRef<'a>
impl<'a> Sync for EntryRef<'a>
impl<'a> Unpin for EntryRef<'a>
impl<'a> !UnwindSafe for EntryRef<'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<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> 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