Struct DirectoryDrive

Source
pub struct DirectoryDrive { /* private fields */ }
Expand description

A drive that is backed by an on-disk directory.

Implementations§

Source§

impl DirectoryDrive

Source

pub fn new<P: Into<PathBuf>>(dir: P) -> Result<Self>

Creates a new drive backed by the dir directory.

Trait Implementations§

Source§

impl Drive for DirectoryDrive

Source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 mut self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Deletes the program given by name.
Source§

fn enumerate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<DriveFiles>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the entries in the store and their metadata.
Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads the contents of the program given by name.
Source§

fn put<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, name: &'life1 str, content: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Saves the in-memory program given by content into name.
Source§

fn system_path(&self, name: &str) -> Option<PathBuf>

Gets the system-addressable path of the file _name, if any.
Source§

fn get_acls<'life0, 'life1, 'async_trait>( &'life0 self, _name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<FileAcls>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Gets the ACLs of the file _name.
Source§

fn update_acls<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _name: &'life1 str, _add: &'life2 FileAcls, _remove: &'life3 FileAcls, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Updates the ACLs of the file _name by extending them with the contents of _add and removing the existing entries listed in _remove.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

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.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V