Struct broot::tree::TreeLine

source ·
pub struct TreeLine {
Show 17 fields pub bid: BId, pub parent_bid: Option<BId>, pub left_branchs: Box<[bool]>, pub depth: u16, pub path: PathBuf, pub subpath: String, pub icon: Option<char>, pub name: String, pub line_type: TreeLineType, pub has_error: bool, pub nb_kept_children: usize, pub unlisted: usize, pub score: i32, pub direct_match: bool, pub sum: Option<FileSum>, pub metadata: Metadata, pub git_status: Option<LineGitStatus>,
}
Expand description

a line in the representation of the file hierarchy

Fields§

§bid: BId§parent_bid: Option<BId>§left_branchs: Box<[bool]>§depth: u16§path: PathBuf§subpath: String§icon: Option<char>§name: String§line_type: TreeLineType§has_error: bool§nb_kept_children: usize§unlisted: usize§score: i32§direct_match: bool§sum: Option<FileSum>§metadata: Metadata§git_status: Option<LineGitStatus>

Implementations§

source§

impl TreeLine

source

pub fn double_extension_from_name(name: &str) -> Option<&str>

source

pub fn extension_from_name(name: &str) -> Option<&str>

source

pub fn is_selectable(&self) -> bool

source

pub fn is_dir(&self) -> bool

source

pub fn is_file(&self) -> bool

source

pub fn is_of(&self, selection_type: SelectionType) -> bool

source

pub fn extension(&self) -> Option<&str>

source

pub fn selection_type(&self) -> SelectionType

source

pub fn as_selection(&self) -> Selection<'_>

source

pub fn mode(&self) -> Mode

source

pub fn device_id(&self) -> DeviceId

source

pub fn mount(&self) -> Option<Mount>

source

pub fn is_exe(&self) -> bool

source

pub fn target(&self) -> &Path

build and return the absolute targeted path: either self.path or the solved canonicalized symlink

Trait Implementations§

source§

impl Clone for TreeLine

source§

fn clone(&self) -> TreeLine

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TreeLine

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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere
T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.