FileBytesRefWr

Struct FileBytesRefWr 

Source
pub struct FileBytesRefWr<'a, 'vfs, Vfs: 'vfs>(/* private fields */)
where
    'vfs: 'a;
Expand description

The WriteTo wrapper around a reference to a [u8].

Trait Implementations§

Source§

impl<'a, 'vfs, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for FileBytesRefWr<'a, 'vfs, Vfs>
where 'vfs: 'a,

Source§

fn write_to(&self, path: &Vfs::Path, vfs: Pin<&'vfs Vfs>) -> VfsResult<(), Vfs>

Writes the structure to the specified path.
Source§

impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileBytesRefWr<'a, 'a, Vfs>

Available on crate feature async only.
Source§

type Future = Pin<Box<dyn Future<Output = Result<(), Error<<<Vfs as VfsCore>::Path as PathType>::OwnedPath>>> + Send + 'a>>

The future type returned by the async write function.
Source§

fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future

Asynchronously writes the structure to the specified path.

Auto Trait Implementations§

§

impl<'a, 'vfs, Vfs> Freeze for FileBytesRefWr<'a, 'vfs, Vfs>

§

impl<'a, 'vfs, Vfs> RefUnwindSafe for FileBytesRefWr<'a, 'vfs, Vfs>
where Vfs: RefUnwindSafe,

§

impl<'a, 'vfs, Vfs> Send for FileBytesRefWr<'a, 'vfs, Vfs>
where Vfs: Sync,

§

impl<'a, 'vfs, Vfs> Sync for FileBytesRefWr<'a, 'vfs, Vfs>
where Vfs: Sync,

§

impl<'a, 'vfs, Vfs> Unpin for FileBytesRefWr<'a, 'vfs, Vfs>

§

impl<'a, 'vfs, Vfs> UnwindSafe for FileBytesRefWr<'a, 'vfs, Vfs>
where Vfs: RefUnwindSafe,

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> DirStructureItem for T

Source§

fn read(path: impl AsRef<<FsVfs as VfsCore>::Path>) -> VfsResult<Self, FsVfs>
where Self: ReadFrom<'static, FsVfs> + Sized,

Uses the ReadFrom implementation to read the structure from disk, from the specified path.
Source§

fn write<'a, 'vfs: 'a>( &'a self, path: impl AsRef<<FsVfs as VfsCore>::Path>, ) -> VfsResult<(), FsVfs>
where Self: WriteTo<'vfs, FsVfs>,

Uses the WriteTo implementation to write the structure to disk at the specified path.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.