pub struct PluginFiles(pub Arc<dyn Files>);Expand description
The files of a session’s store under PLUGINS, by their names there:
what a plugin keeps for the session.
Tuple Fields§
§0: Arc<dyn Files>Trait Implementations§
Source§impl Files for PluginFiles
impl Files for PluginFiles
Source§fn write_file(&self, name: &str, bytes: &[u8]) -> Result<()>
fn write_file(&self, name: &str, bytes: &[u8]) -> Result<()>
Replaces the file
name with bytes, atomically: a reader sees the
old content or the new.Source§fn append_file(&self, name: &str, bytes: &[u8]) -> Result<()>
fn append_file(&self, name: &str, bytes: &[u8]) -> Result<()>
Adds
bytes at the end of the file name, which it creates when
there is none.Source§fn read_file(&self, name: &str) -> Result<Vec<u8>>
fn read_file(&self, name: &str) -> Result<Vec<u8>>
The file
name; io::ErrorKind::NotFound when there is none.Auto Trait Implementations§
impl !RefUnwindSafe for PluginFiles
impl !UnwindSafe for PluginFiles
impl Freeze for PluginFiles
impl Send for PluginFiles
impl Sync for PluginFiles
impl Unpin for PluginFiles
impl UnsafeUnpin for PluginFiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more