MemFloppyDisk

Struct MemFloppyDisk 

Source
pub struct MemFloppyDisk { /* private fields */ }

Implementations§

Source§

impl MemFloppyDisk

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Debug for MemFloppyDisk

Source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> FloppyDirEntry<'a, MemFloppyDisk> for MemDirEntry

Source§

fn path(&self) -> PathBuf

Source§

fn file_name(&self) -> OsString

Source§

fn metadata<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<<MemFloppyDisk as FloppyDisk<'_>>::Metadata>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn file_type<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<<MemFloppyDisk as FloppyDisk<'_>>::FileType>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn ino(&self) -> u64

Source§

impl<'a> FloppyDisk<'a> for MemFloppyDisk

Source§

type DirBuilder = MemDirBuilder<'a>

Source§

type DirEntry = MemDirEntry

Source§

type File = MemFile

Source§

type FileType = MemFileType

Source§

type Metadata = MemMetadata

Source§

type OpenOptions = MemOpenOptions

Source§

type Permissions = MemPermissions

Source§

type ReadDir = MemReadDir

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn new_dir_builder(&'a self) -> Self::DirBuilder

Source§

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,

Search the given directory non-recursively for a file or directory matching the given needle. If a file is found, return its path.
Source§

impl FloppyDiskUnixExt for MemFloppyDisk

Source§

fn chown<'life0, 'async_trait, P>( &'life0 self, path: P, uid: u32, gid: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + Into<PathBuf> + Send, Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<'a> FloppyFile<'a, MemFloppyDisk> for MemFile

Source§

fn sync_all<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn sync_data<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn set_len<'life0, 'async_trait>( &'life0 mut self, size: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn metadata<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<<MemFloppyDisk as FloppyDisk<'_>>::Metadata>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn try_clone<'async_trait>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Box<Self>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Source§

fn set_permissions<'life0, 'async_trait>( &'life0 self, perm: <MemFloppyDisk as FloppyDisk<'_>>::Permissions, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn permissions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<<MemFloppyDisk as FloppyDisk<'_>>::Permissions>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<'a> FloppyMetadata<'a, MemFloppyDisk> for MemMetadata

Source§

impl<'a> FloppyOpenOptions<'a, MemFloppyDisk> for MemOpenOptions

Source§

fn new() -> Self

Source§

fn read(self, read: bool) -> Self

Source§

fn write(self, write: bool) -> Self

Source§

fn append(self, append: bool) -> Self

Source§

fn truncate(self, truncate: bool) -> Self

Source§

fn create(self, create: bool) -> Self

Source§

fn create_new(self, create_new: bool) -> Self

Source§

fn open<'life0, 'async_trait, P>( &'life0 self, disk: &'a MemFloppyDisk, path: P, ) -> Pin<Box<dyn Future<Output = Result<<MemFloppyDisk as FloppyDisk<'a>>::File>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source§

impl<'a> FloppyReadDir<'a, MemFloppyDisk> for MemReadDir

Source§

fn next_entry<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<<MemFloppyDisk as FloppyDisk<'_>>::DirEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more