IoOutput

Trait IoOutput 

Source
pub trait IoOutput {
    type Error;

    // Required method
    async fn write(&mut self, value: &str) -> Result<(), Self::Error>;
}
Expand description

The raw IO output.

This trait is not implemented by the library in a concrete way. Instead, depending on which async runtime you are using, you will have to implement it yourself.

Required Associated Types§

Source

type Error

The error type for write operations

Required Methods§

Source

async fn write(&mut self, value: &str) -> Result<(), Self::Error>

Writes a string to the output. Yields an error upon failure.

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.

Implementations on Foreign Types§

Source§

impl<'o, O> IoOutput for &'o mut O
where O: IoOutput,

Source§

type Error = <O as IoOutput>::Error

Source§

async fn write(&mut self, value: &str) -> Result<(), Self::Error>

Implementors§