Struct diskscan::EntrySnapshot

source ·
pub struct EntrySnapshot { /* private fields */ }

Implementations§

source§

impl EntrySnapshot

source

pub fn get_children_count(&self) -> usize

source

pub fn get_id(&self) -> Id

source

pub fn get_name(&self) -> &str

source

pub fn get_parent_id(&self) -> Option<Id>

source

pub fn get_size(&self) -> Byte

source

pub fn is_dir(&self) -> bool

source

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

source

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

source

pub fn set_parent(&mut self, id: Id)

Sets new parent of this snapshot

Trait Implementations§

source§

impl AsMut<EntrySnapshot> for EntrySnapshot

source§

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

source§

fn as_ref(&self) -> &EntrySnapshot

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Debug for EntrySnapshot

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.