Skip to main content

IoFsWrite

Trait IoFsWrite 

Source
pub trait IoFsWrite: IoFs {
    // Required method
    unsafe fn write_bytes_unchecked(
        &mut self,
        path: String,
        data: &[u8],
    ) -> Result<(), IoError>;

    // Provided methods
    fn save<T>(&mut self, path: &str, value: &T) -> Result<(), IoErrorKind>
       where T: IoSave + ?Sized { ... }
    fn save_with_extension<T>(
        &mut self,
        path: &str,
        extension: &str,
        value: &T,
    ) -> Result<(), IoErrorKind>
       where T: IoSave + ?Sized { ... }
    fn have_permission_to_write(&self, path: &str) -> Result<(), IoErrorKind> { ... }
}

Required Methods§

Source

unsafe fn write_bytes_unchecked( &mut self, path: String, data: &[u8], ) -> Result<(), IoError>

The permission was not checked when calling this function

Provided Methods§

Source

fn save<T>(&mut self, path: &str, value: &T) -> Result<(), IoErrorKind>
where T: IoSave + ?Sized,

Source

fn save_with_extension<T>( &mut self, path: &str, extension: &str, value: &T, ) -> Result<(), IoErrorKind>
where T: IoSave + ?Sized,

Source

fn have_permission_to_write(&self, path: &str) -> Result<(), IoErrorKind>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§