Skip to main content

Console

Trait Console 

Source
pub trait Console {
    // Required methods
    fn write_stdout<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        buffer: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<(), ConsoleError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn write_stderr<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        buffer: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<(), ConsoleError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn flush<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ConsoleError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A console.

Required Methods§

Source

fn write_stdout<'life0, 'life1, 'async_trait>( &'life0 mut self, buffer: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), ConsoleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes bytes to standard output.

Source

fn write_stderr<'life0, 'life1, 'async_trait>( &'life0 mut self, buffer: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), ConsoleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes bytes to standard error.

Source

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

Flushes standard output and error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§