pub struct Storage { /* private fields */ }
Expand description

Storage subsystem representation.

At the moment, the storage subsystem is backed by a single drive, so this type is a wrapper for the Drive type.

Implementations§

Registers a new drive factory to handle the scheme. Must not have previously been registered and the scheme must be in lowercase.

Returns true if the scheme is already registered.

Converts a location, which needn’t exist, to its canonical form.

Instantiates and attaches a new drive with name that points to uri.

The name must be valid and must not yet have been registered.

Detaches an existing drive named name.

The drive name must exist, cannot be the current drive, and cannot be the last mounted drive.

Returns information about the mounted drives as a mapping of drive names to the URIs that were used to mount them.

Changes the current location.

Given that we currently do not support directories, the location can only be of the forms DRIVE: or DRIVE:/.

Returns the current location, used to resolve relative paths.

Deletes the program given by raw_location.

Returns a sorted list of the entries in raw_location and their metadata.

Loads the contents of the program given by raw_location.

Gets the ACLs of the file raw_location.

Saves the in-memory program given by content into raw_location.

Updates the ACLs of the file raw_location by extending them with the contents of add and removing the existing entries listed in remove.

Gets the system-addressable path of raw_location, if any.

Trait Implementations§

Creates a new storage subsytem backed by an in-memory drive.

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.