#[non_exhaustive]pub enum CallbackEntry {
Stored(MemoryEntry),
Hardlink {
target: SafePath,
},
}Expand description
An entry delivered by a CallbackSink.
Everything a MemorySink can hold is
Stored; a hardlink is delivered by reference instead,
because the sink keeps no bytes to copy.
§Examples
use exarch_core::CallbackEntry;
use exarch_core::MemoryEntry;
use exarch_core::MemoryEntryKind;
let entry = CallbackEntry::from(MemoryEntry::Directory);
assert_eq!(entry.kind(), MemoryEntryKind::Directory);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stored(MemoryEntry)
A file, directory or symlink, as a MemorySink
would store it.
Hardlink
A hard link to an entry that was already delivered, by reference.
Implementations§
Source§impl CallbackEntry
impl CallbackEntry
Sourcepub const fn kind(&self) -> MemoryEntryKind
pub const fn kind(&self) -> MemoryEntryKind
What the entry holds.
Trait Implementations§
Source§impl Clone for CallbackEntry
impl Clone for CallbackEntry
Source§impl Debug for CallbackEntry
impl Debug for CallbackEntry
impl Eq for CallbackEntry
Source§impl From<MemoryEntry> for CallbackEntry
impl From<MemoryEntry> for CallbackEntry
Source§fn from(entry: MemoryEntry) -> Self
fn from(entry: MemoryEntry) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CallbackEntry
impl PartialEq for CallbackEntry
impl StructuralPartialEq for CallbackEntry
Auto Trait Implementations§
impl Freeze for CallbackEntry
impl RefUnwindSafe for CallbackEntry
impl Send for CallbackEntry
impl Sync for CallbackEntry
impl Unpin for CallbackEntry
impl UnsafeUnpin for CallbackEntry
impl UnwindSafe for CallbackEntry
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.