Struct diskscan::EntrySnapshot
source · 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.