Skip to main content

OptionPathExt

Trait OptionPathExt 

Source
pub trait OptionPathExt<T>: Send {
Show 46 methods // Required methods fn metadata_async( self, ) -> impl Future<Output = Result<Option<Metadata>>> + Send; fn symlink_metadata_async( self, ) -> impl Future<Output = Result<Option<Metadata>>> + Send; fn canonicalize_async( self, ) -> impl Future<Output = Result<Option<PathBuf>>> + Send; fn read_link_async( self, ) -> impl Future<Output = Result<Option<PathBuf>>> + Send; fn read_dir_async( self, ) -> impl Future<Output = Result<Option<ReadDir>>> + Send; fn try_exists_async( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_file(self) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_dir(self) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_symlink(self) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_exists_nofollow( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_file_nofollow( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_dir_nofollow( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_read_link_broken( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn try_is_read_dir_empty( self, ) -> impl Future<Output = Result<Option<bool>>> + Send; fn create_new(self) -> impl Future<Output = Result<Option<File>>> + Send; fn create(self) -> impl Future<Output = Result<Option<File>>> + Send; fn open(self) -> impl Future<Output = Result<Option<File>>> + Send; fn read(self) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send; fn read_to_string( self, ) -> impl Future<Output = Result<Option<String>>> + Send; fn read_lines( self, ) -> impl Future<Output = Result<Option<Lines<BufReader<File>>>>> + Send; fn create_dir_all(self) -> impl Future<Output = Result<Option<T>>> + Send; fn create_dir(self) -> impl Future<Output = Result<Option<T>>> + Send; fn write_new( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn write( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn append( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn copy( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn rename( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_file(self) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_dir(self) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_dir_all(self) -> impl Future<Output = Result<Option<T>>> + Send; fn hard_link( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn hard_link_atomic( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink_atomic( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink_absolute( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink_absolute_atomic( self, link: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink_relative( self, link: impl AsRef<Path> + Send + Sync, ) -> impl Future<Output = Result<Option<T>>> + Send; fn symlink_relative_atomic( self, link: impl AsRef<Path> + Send + Sync, ) -> impl Future<Output = Result<Option<T>>> + Send; fn set_permissions( self, perm: Permissions, ) -> impl Future<Output = Result<Option<T>>> + Send; fn set_permissions_readonly( self, readonly: bool, ) -> impl Future<Output = Result<Option<T>>> + Send; fn set_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send; fn add_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send; fn remove_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send; fn chown( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send; fn chown_nofollow( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send; fn chroot(self) -> impl Future<Output = Result<Option<T>>> + Send;
}
Available on crate feature tokio only.

Required Methods§

Source

fn metadata_async(self) -> impl Future<Output = Result<Option<Metadata>>> + Send

Source

fn canonicalize_async( self, ) -> impl Future<Output = Result<Option<PathBuf>>> + Send

Source

fn read_dir_async(self) -> impl Future<Output = Result<Option<ReadDir>>> + Send

Source

fn try_exists_async(self) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn try_is_file(self) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn try_is_dir(self) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn try_exists_nofollow( self, ) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn try_is_file_nofollow( self, ) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn try_is_dir_nofollow( self, ) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn try_is_read_dir_empty( self, ) -> impl Future<Output = Result<Option<bool>>> + Send

Source

fn create_new(self) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn create(self) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn open(self) -> impl Future<Output = Result<Option<File>>> + Send

Source

fn read(self) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send

Source

fn read_to_string(self) -> impl Future<Output = Result<Option<String>>> + Send

Source

fn read_lines( self, ) -> impl Future<Output = Result<Option<Lines<BufReader<File>>>>> + Send

Source

fn create_dir_all(self) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn create_dir(self) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn write_new( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn write( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn append( self, contents: impl AsRef<[u8]> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn copy( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn rename( self, to: impl AsRef<Path> + Send, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn remove_file(self) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn remove_dir(self) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn remove_dir_all(self) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Source

fn set_permissions( self, perm: Permissions, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn set_permissions_readonly( self, readonly: bool, ) -> impl Future<Output = Result<Option<T>>> + Send

Source

fn set_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn add_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn remove_permissions_mode( self, mode: u32, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn chown( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn chown_nofollow( self, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix only.
Source

fn chroot(self) -> impl Future<Output = Result<Option<T>>> + Send

Available on Unix and non-Fuchsia only.

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<T: PathExt> OptionPathExt<T> for Option<T>

Source§

async fn metadata_async(self) -> Result<Option<Metadata>>

Source§

async fn canonicalize_async(self) -> Result<Option<PathBuf>>

Source§

async fn read_dir_async(self) -> Result<Option<ReadDir>>

Source§

async fn try_exists_async(self) -> Result<Option<bool>>

Source§

async fn try_is_file(self) -> Result<Option<bool>>

Source§

async fn try_is_dir(self) -> Result<Option<bool>>

Source§

async fn try_exists_nofollow(self) -> Result<Option<bool>>

Source§

async fn try_is_file_nofollow(self) -> Result<Option<bool>>

Source§

async fn try_is_dir_nofollow(self) -> Result<Option<bool>>

Source§

async fn try_is_read_dir_empty(self) -> Result<Option<bool>>

Source§

async fn create_new(self) -> Result<Option<File>>

Source§

async fn create(self) -> Result<Option<File>>

Source§

async fn open(self) -> Result<Option<File>>

Source§

async fn read(self) -> Result<Option<Vec<u8>>>

Source§

async fn read_to_string(self) -> Result<Option<String>>

Source§

async fn read_lines(self) -> Result<Option<Lines<BufReader<File>>>>

Source§

async fn create_dir_all(self) -> Result<Option<T>>

Source§

async fn create_dir(self) -> Result<Option<T>>

Source§

async fn write_new(self, contents: impl AsRef<[u8]> + Send) -> Result<Option<T>>

Source§

async fn write(self, contents: impl AsRef<[u8]> + Send) -> Result<Option<T>>

Source§

async fn append(self, contents: impl AsRef<[u8]> + Send) -> Result<Option<T>>

Source§

async fn copy(self, to: impl AsRef<Path> + Send) -> Result<Option<T>>

Source§

async fn rename(self, to: impl AsRef<Path> + Send) -> Result<Option<T>>

Source§

async fn remove_file(self) -> Result<Option<T>>

Source§

async fn remove_dir(self) -> Result<Option<T>>

Source§

async fn remove_dir_all(self) -> Result<Option<T>>

Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Available on Unix only.
Source§

async fn set_permissions(self, perm: Permissions) -> Result<Option<T>>

Source§

async fn set_permissions_readonly(self, readonly: bool) -> Result<Option<T>>

Source§

async fn set_permissions_mode(self, mode: u32) -> Result<Option<T>>

Available on Unix only.
Source§

async fn add_permissions_mode(self, mode: u32) -> Result<Option<T>>

Available on Unix only.
Source§

async fn remove_permissions_mode(self, mode: u32) -> Result<Option<T>>

Available on Unix only.
Source§

async fn chown(self, uid: Option<u32>, gid: Option<u32>) -> Result<Option<T>>

Available on Unix only.
Source§

async fn chown_nofollow( self, uid: Option<u32>, gid: Option<u32>, ) -> Result<Option<T>>

Available on Unix only.
Source§

async fn chroot(self) -> Result<Option<T>>

Available on Unix and non-Fuchsia only.

Implementors§