pub trait FileExt: Send {
// Required methods
fn open_if_exists(
path: impl AsRef<Path> + Send,
) -> impl Future<Output = Result<Option<Self>>> + Send
where Self: Sized;
fn create_if_not_exists(
path: impl AsRef<Path> + Send,
) -> impl Future<Output = Result<Option<Self>>> + Send
where Self: Sized;
fn create_new_if_not_exists(
path: impl AsRef<Path> + Send,
) -> impl Future<Output = Result<Option<Self>>> + Send
where Self: Sized;
fn set_permissions_mode(
&self,
permissions_mode: u32,
) -> impl Future<Output = Result<&Self>> + Send;
fn add_permissions_mode(
&self,
permissions_mode: u32,
) -> impl Future<Output = Result<&Self>> + Send;
fn remove_permissions_mode(
&self,
permissions_mode: u32,
) -> impl Future<Output = Result<&Self>> + Send;
}Required Methods§
fn open_if_exists(
path: impl AsRef<Path> + Send,
) -> impl Future<Output = Result<Option<Self>>> + Sendwhere
Self: Sized,
fn create_if_not_exists(
path: impl AsRef<Path> + Send,
) -> impl Future<Output = Result<Option<Self>>> + Sendwhere
Self: Sized,
fn create_new_if_not_exists(
path: impl AsRef<Path> + Send,
) -> impl Future<Output = Result<Option<Self>>> + Sendwhere
Self: Sized,
fn set_permissions_mode( &self, permissions_mode: u32, ) -> impl Future<Output = Result<&Self>> + Send
fn add_permissions_mode( &self, permissions_mode: u32, ) -> impl Future<Output = Result<&Self>> + Send
fn remove_permissions_mode( &self, permissions_mode: u32, ) -> impl Future<Output = Result<&Self>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".