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, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for CleanDir<T>
where T: WriteToAsyncRef<'a, Vfs> + Send + Sync + 'static, for<'f> <Vfs as VfsAsync>::ExistsFuture<'f>: Future<Output = VfsResult<bool, Vfs>> + Unpin + 'f, for<'f> <Vfs as WriteSupportingVfsAsync>::RemoveDirAllFuture<'f>: Future<Output = VfsResult<(), Vfs>> + Unpin + 'f,

Source§

type Inner = T

Source§

type Wr = CleanDirRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for Json<T>
where T: Serialize + for<'d> Deserialize<'d> + Send + Sync + 'static,

Available on crate feature json only.
Source§

type Inner = T

Source§

type Wr = JsonRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for JsonPretty<T>
where T: Serialize + for<'d> Deserialize<'d> + Send + Sync + 'static,

Available on crate feature json only.
Source§

type Inner = T

Source§

type Wr = JsonPrettyRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for Ron<T>
where T: Serialize + for<'d> Deserialize<'d> + Send + Sync + 'static,

Available on crate feature ron only.
Source§

type Inner = T

Source§

type Wr = RonRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for RonPretty<T>
where T: Serialize + for<'d> Deserialize<'d> + Send + Sync + 'static,

Available on crate feature ron only.
Source§

type Inner = T

Source§

type Wr = RonPrettyRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for Toml<T>
where T: Serialize + for<'d> Deserialize<'d> + Send + Sync + 'static,

Available on crate feature toml only.
Source§

type Inner = T

Source§

type Wr = TomlRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for Yaml<T>
where T: Serialize + for<'d> Deserialize<'d> + Send + Sync + 'static,

Available on crate feature yaml only.
Source§

type Inner = T

Source§

type Wr = YamlRefWr<'a, 'a, T, Vfs>

Source§

impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for FmtWrapper<T>
where T: Display + Send + 'a,

Source§

type Inner = T

Source§

type Wr = FmtWrapperRefWr<'a, 'a, T, Vfs>

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>