Struct simply_fuse::basic::INodeTable[][src]

pub struct INodeTable<F> { /* fields omitted */ }
Expand description

A generic INodeTable which allows indexing by paths and inodes

Maps F as a “File” type

Implementations

pub fn push_entry<E: IntoINodeEntry<F>>(
    &mut self,
    parent: INode,
    name: OsString,
    entry: E
) -> Option<INode>

Looks up a path. Will function with or without a leading slash

let mut tbl = INodeTable::<()>::default();
let test_dir_inode = tbl.push_entry(ROOT_INODE, "example directory".into(),
Directory::default()).unwrap();

let root = tbl.lookup("/").unwrap();
let test_dir = tbl.lookup("example directory").unwrap();

assert_eq!(root.0, ROOT_INODE);
assert_eq!(test_dir.0, test_dir_inode);

See lookup for details

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more