Skip to main content

OpenOptionsExt

Trait OpenOptionsExt 

Source
pub trait OpenOptionsExt: Send {
    // Required methods
    fn open_if_not_exists(
        &self,
        path: impl AsRef<Path> + Send,
    ) -> impl Future<Output = Result<Option<File>>> + Send;
    fn open_if_exists(
        &self,
        path: impl AsRef<Path> + Send,
    ) -> impl Future<Output = Result<Option<File>>> + Send;
}
Available on crate feature tokio only.

Required Methods§

Source

fn open_if_not_exists( &self, path: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn open_if_exists( &self, path: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<File>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl OpenOptionsExt for OpenOptions

Source§

async fn open_if_not_exists( &self, path: impl AsRef<Path> + Send, ) -> Result<Option<File>>

Source§

async fn open_if_exists( &self, path: impl AsRef<Path> + Send, ) -> Result<Option<File>>

Implementors§