pub trait SyncFsOps {
Show 25 methods
// Required methods
fn chmod_sync(&self, mode: u32) -> Result<()>;
fn chown_sync(&self, uid: Option<u32>, gid: Option<u32>) -> Result<()>;
fn create_dir_all_sync(&self) -> Result<()>;
fn create_dir_sync(&self) -> Result<()>;
fn empty_dir_sync(&self) -> Result<()>;
fn exists_sync(&self) -> Result<bool>;
fn get_file_size_sync(&self) -> Result<u64>;
fn is_block_device_sync(&self) -> Result<bool>;
fn is_char_device_sync(&self) -> Result<bool>;
fn is_dir_sync(&self) -> Result<bool>;
fn is_fifo_sync(&self) -> Result<bool>;
fn is_file_sync(&self) -> Result<bool>;
fn is_socket_sync(&self) -> Result<bool>;
fn is_symlink_sync(&self) -> Result<bool>;
fn metadata_sync(&self) -> Result<Metadata>;
fn read_sync(&self) -> Result<Vec<u8>>;
fn read_dir_sync(&self) -> Result<ReadDir>;
fn read_json_sync<T: for<'de> Deserialize<'de>>(&self) -> Result<T>;
fn read_to_string_sync(&self) -> Result<String>;
fn remove_dir_all_sync(&self) -> Result<()>;
fn remove_dir_sync(&self) -> Result<()>;
fn set_permissions_sync(&self, permissions: Permissions) -> Result<()>;
fn truncate_sync(&self, len: Option<u64>) -> Result<()>;
fn write_sync(&self, contents: impl AsRef<[u8]>) -> Result<()>;
fn write_json_sync(&self, data: impl Serialize) -> Result<()>;
}
Required Methods§
fn chmod_sync(&self, mode: u32) -> Result<()>
fn chown_sync(&self, uid: Option<u32>, gid: Option<u32>) -> Result<()>
fn create_dir_all_sync(&self) -> Result<()>
fn create_dir_sync(&self) -> Result<()>
fn empty_dir_sync(&self) -> Result<()>
fn exists_sync(&self) -> Result<bool>
fn get_file_size_sync(&self) -> Result<u64>
fn is_block_device_sync(&self) -> Result<bool>
fn is_char_device_sync(&self) -> Result<bool>
fn is_dir_sync(&self) -> Result<bool>
fn is_fifo_sync(&self) -> Result<bool>
fn is_file_sync(&self) -> Result<bool>
fn is_socket_sync(&self) -> Result<bool>
fn is_symlink_sync(&self) -> Result<bool>
fn metadata_sync(&self) -> Result<Metadata>
fn read_sync(&self) -> Result<Vec<u8>>
fn read_dir_sync(&self) -> Result<ReadDir>
fn read_json_sync<T: for<'de> Deserialize<'de>>(&self) -> Result<T>
fn read_to_string_sync(&self) -> Result<String>
fn remove_dir_all_sync(&self) -> Result<()>
fn remove_dir_sync(&self) -> Result<()>
fn set_permissions_sync(&self, permissions: Permissions) -> Result<()>
fn truncate_sync(&self, len: Option<u64>) -> Result<()>
fn write_sync(&self, contents: impl AsRef<[u8]>) -> Result<()>
fn write_json_sync(&self, data: impl Serialize) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.