FromRefForWriterAsync

Trait FromRefForWriterAsync 

Source
pub trait FromRefForWriterAsync<'a, Vfs: WriteSupportingVfsAsync + ?Sized + 'a> {
    type Inner: ?Sized;
    type Wr: WriteToAsync<'a, Vfs> + 'a;

    // Required method
    fn from_ref_for_writer_async(value: &'a Self::Inner) -> Self::Wr;
}
Available on crate feature async only.
Expand description

Async equivalent of FromRefForWriter.

Required Associated Types§

Source

type Inner: ?Sized

The inner type to cast.

Source

type Wr: WriteToAsync<'a, Vfs> + 'a

The reference type to cast to.

Required Methods§

Source

fn from_ref_for_writer_async(value: &'a Self::Inner) -> Self::Wr

Casts the reference to the inner type to a WriteToAsync reference type.

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.

Implementors§

Source§

impl<'a, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for FileBytes

Source§

type Inner = [u8]

Source§

type Wr = FileBytesRefWr<'a, 'a, Vfs>

Source§

impl<'a, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for FileString

Source§

type Inner = str

Source§

type Wr = FileStrWr<'a, 'a, Vfs>