pub trait FloppyDisk<'a>:
Debug
+ Unpin
+ Sized
+ Send {
type DirBuilder: FloppyDirBuilder + Send + 'a;
type DirEntry: FloppyDirEntry<'a, Self> + Send + 'a;
type File: FloppyFile<'a, Self> + Send + 'a;
type FileType: FloppyFileType + Send + 'a;
type Metadata: FloppyMetadata<'a, Self> + Send + 'a;
type OpenOptions: FloppyOpenOptions<'a, Self> + Send + 'a;
type Permissions: FloppyPermissions + Send + 'a;
type ReadDir: FloppyReadDir<'a, Self> + Send + 'a;
Show 21 methods
// Required methods
fn canonicalize<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn copy<'life0, 'async_trait, P>(
&'life0 self,
from: P,
to: P,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn create_dir<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn create_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn hard_link<'life0, 'async_trait, P>(
&'life0 self,
src: P,
dst: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn metadata<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<Self::Metadata>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn read<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn read_dir<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<Self::ReadDir>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn read_link<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn read_to_string<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn remove_dir<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn remove_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn remove_file<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn rename<'life0, 'async_trait, P>(
&'life0 self,
from: P,
to: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn set_permissions<'life0, 'async_trait, P>(
&'life0 self,
path: P,
perm: Self::Permissions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn symlink<'life0, 'async_trait, P>(
&'life0 self,
src: P,
dst: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn symlink_metadata<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<Self::Metadata>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn try_exists<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn write<'life0, 'async_trait, P>(
&'life0 self,
path: P,
contents: impl 'async_trait + AsRef<[u8]> + Send,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn new_dir_builder(&'a self) -> Self::DirBuilder;
// Provided method
fn find_in_dir<'life0, 'async_trait, P, S>(
&'life0 self,
path: P,
needle: S,
) -> Pin<Box<dyn Future<Output = Result<Option<PathBuf>>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
S: 'async_trait + Into<String> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Required Associated Types§
type DirBuilder: FloppyDirBuilder + Send + 'a
type DirEntry: FloppyDirEntry<'a, Self> + Send + 'a
type File: FloppyFile<'a, Self> + Send + 'a
type FileType: FloppyFileType + Send + 'a
type Metadata: FloppyMetadata<'a, Self> + Send + 'a
type OpenOptions: FloppyOpenOptions<'a, Self> + Send + 'a
type Permissions: FloppyPermissions + Send + 'a
type ReadDir: FloppyReadDir<'a, Self> + Send + 'a
Required Methods§
fn canonicalize<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
fn copy<'life0, 'async_trait, P>( &'life0 self, from: P, to: P, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
fn create_dir<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn create_dir_all<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn hard_link<'life0, 'async_trait, P>( &'life0 self, src: P, dst: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn metadata<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<Self::Metadata>> + Send + 'async_trait>>
fn read<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
fn read_dir<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<Self::ReadDir>> + Send + 'async_trait>>
fn read_link<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
fn read_to_string<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
fn remove_dir<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn remove_dir_all<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn remove_file<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn rename<'life0, 'async_trait, P>( &'life0 self, from: P, to: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn set_permissions<'life0, 'async_trait, P>( &'life0 self, path: P, perm: Self::Permissions, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn symlink<'life0, 'async_trait, P>( &'life0 self, src: P, dst: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn symlink_metadata<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<Self::Metadata>> + Send + 'async_trait>>
fn try_exists<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
fn write<'life0, 'async_trait, P>( &'life0 self, path: P, contents: impl 'async_trait + AsRef<[u8]> + Send, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn new_dir_builder(&'a self) -> Self::DirBuilder
Provided Methods§
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.