Struct grass::NullFs

source ·
pub struct NullFs;
Expand description

A file system implementation that acts like it’s completely empty.

This may be useful for security as it denies all access to the file system (so @import is prevented from leaking anything); you’ll need to use from_string for this to make any sense (since from_path would fail to find a file).

Trait Implementations§

Formats the value using the given formatter. Read more
Returns true if the path exists on disk and is pointing at a regular file.
Returns true if the path exists on disk and is pointing at a directory.
Read the entire contents of a file into a bytes vector.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.