pub struct Entry { /* private fields */ }Expand description
Entry is returned by Page or BlockingPage during list operations.
§Notes
Differences between crate::Entry and oio::Entry:
crate::Entryis the user’s public API and have less public methods.oio::Entryis the raw API and doesn’t expose to users.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn new(path: &str, meta: Metadata) -> Entry
pub fn new(path: &str, meta: Metadata) -> Entry
Create a new entry by its corresponding underlying storage.
§Panics
Panics when the compact metadata block containing path exceeds u16::MAX bytes.
Sourcepub fn with(path: String, meta: Metadata) -> Entry
pub fn with(path: String, meta: Metadata) -> Entry
Create a new entry with given value.
§Panics
Panics when the compact metadata block containing path exceeds u16::MAX bytes.
Sourcepub fn set_path(&mut self, path: &str) -> &mut Self
pub fn set_path(&mut self, path: &str) -> &mut Self
Set path for entry.
§Panics
Panics when the resulting compact metadata block exceeds u16::MAX bytes.
Sourcepub fn into_parts(self) -> (String, Metadata)
pub fn into_parts(self) -> (String, Metadata)
Consume this entry to get its path and metadata.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.