pub struct EntrySnapshot { /* private fields */ }
Implementations§
Source§impl EntrySnapshot
impl EntrySnapshot
pub fn get_children_count(&self) -> usize
pub fn get_id(&self) -> Id
pub fn get_name(&self) -> &str
pub fn get_parent_id(&self) -> Option<Id>
pub fn get_size(&self) -> Byte
pub fn is_dir(&self) -> bool
Sourcepub fn new(id: Id, name: String, size: i64) -> Self
pub fn new(id: Id, name: String, size: i64) -> Self
Returns new snapshot with given parameters
Parent and children of snapshot are empty and should be set explicitly
Sourcepub fn set_children(&mut self, children: Vec<Id>)
pub fn set_children(&mut self, children: Vec<Id>)
Sets new children of this snapshot
Ordering of children is not checked and kept as is
Sourcepub fn set_parent(&mut self, id: Id)
pub fn set_parent(&mut self, id: Id)
Sets new parent of this snapshot
Trait Implementations§
Source§impl AsMut<EntrySnapshot> for EntrySnapshot
impl AsMut<EntrySnapshot> for EntrySnapshot
Source§fn as_mut(&mut self) -> &mut EntrySnapshot
fn as_mut(&mut self) -> &mut EntrySnapshot
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<EntrySnapshot> for EntrySnapshot
impl AsRef<EntrySnapshot> for EntrySnapshot
Source§fn as_ref(&self) -> &EntrySnapshot
fn as_ref(&self) -> &EntrySnapshot
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for EntrySnapshot
impl RefUnwindSafe for EntrySnapshot
impl Send for EntrySnapshot
impl Sync for EntrySnapshot
impl Unpin for EntrySnapshot
impl UnwindSafe for EntrySnapshot
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