pub trait Drive {
// Required methods
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;
fn enumerate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DriveFiles>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
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;
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;
// Provided methods
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 { ... }
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 { ... }
fn system_path(&self, _name: &str) -> Option<PathBuf> { ... }
}
Expand description
Abstract operations to load and store programs on some storage medium.
Required Methods§
Sourcefn 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,
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
.
Sourcefn enumerate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DriveFiles>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn 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,
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
.
Sourcefn 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,
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
.
Provided Methods§
Sourcefn 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,
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
.
Sourcefn 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,
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
.
Sourcefn system_path(&self, _name: &str) -> Option<PathBuf>
fn system_path(&self, _name: &str) -> Option<PathBuf>
Gets the system-addressable path of the file _name
, if any.