Struct parallel_disk_usage::visualizer::tree::TreeHorizontalSlice
source · [−]pub struct TreeHorizontalSlice<Name: Width> { /* private fields */ }Expand description
Horizontal slice of a tree of the height of exactly 1 line of text.
Implementations
sourceimpl TreeHorizontalSlice<String>
impl TreeHorizontalSlice<String>
sourcepub fn truncate(&mut self, max_width: usize) -> Result<(), usize>
pub fn truncate(&mut self, max_width: usize) -> Result<(), usize>
Truncate the name to fit specified max_width.
- If
max_widthis already sufficient, do nothing other than returnOk(()). - If
max_widthis insufficient even for the required part, returnErr(N)whereNis the required width. - If
max_widthis sufficient for the required part but insufficient for the name, truncate and add"..."to the name.
Trait Implementations
sourceimpl<Name: Clone + Width> Clone for TreeHorizontalSlice<Name>
impl<Name: Clone + Width> Clone for TreeHorizontalSlice<Name>
sourcefn clone(&self) -> TreeHorizontalSlice<Name>
fn clone(&self) -> TreeHorizontalSlice<Name>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<Name: Debug + Width> Debug for TreeHorizontalSlice<Name>
impl<Name: Debug + Width> Debug for TreeHorizontalSlice<Name>
sourceimpl<Name: Width> Display for TreeHorizontalSlice<Name>
impl<Name: Width> Display for TreeHorizontalSlice<Name>
sourceimpl<Name: PartialEq + Width> PartialEq<TreeHorizontalSlice<Name>> for TreeHorizontalSlice<Name>
impl<Name: PartialEq + Width> PartialEq<TreeHorizontalSlice<Name>> for TreeHorizontalSlice<Name>
sourcefn eq(&self, other: &TreeHorizontalSlice<Name>) -> bool
fn eq(&self, other: &TreeHorizontalSlice<Name>) -> bool
sourceimpl<Name: Width> Width for TreeHorizontalSlice<Name>
impl<Name: Width> Width for TreeHorizontalSlice<Name>
impl<Name: Eq + Width> Eq for TreeHorizontalSlice<Name>
impl<Name: Width> StructuralEq for TreeHorizontalSlice<Name>
impl<Name: Width> StructuralPartialEq for TreeHorizontalSlice<Name>
Auto Trait Implementations
impl<Name> RefUnwindSafe for TreeHorizontalSlice<Name>where
Name: RefUnwindSafe,
impl<Name> Send for TreeHorizontalSlice<Name>where
Name: Send,
impl<Name> Sync for TreeHorizontalSlice<Name>where
Name: Sync,
impl<Name> Unpin for TreeHorizontalSlice<Name>where
Name: Unpin,
impl<Name> UnwindSafe for TreeHorizontalSlice<Name>where
Name: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<X> Pipe for X
impl<X> Pipe for X
sourcefn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
sourcefn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
sourcefn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moresourcefn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moresourcefn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moresourcefn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait [DerefMut<Target = Param>]. Read moresourcefn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moresourcefn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read more