[][src]Trait artichoke_core::io::Io

pub trait Io {
    type Error;
    pub fn print<T: AsRef<[u8]>>(
        &mut self,
        message: T
    ) -> Result<(), Self::Error>; pub fn puts<T: AsRef<[u8]>>(
        &mut self,
        message: T
    ) -> Result<(), Self::Error> { ... } }

Make I/O external to the interpreter.

Associated Types

type Error[src]

Concrete error type for errors encountered when reading and writing.

Loading content...

Required methods

pub fn print<T: AsRef<[u8]>>(&mut self, message: T) -> Result<(), Self::Error>[src]

Writes the given bytes to the interpreter stdout stream.

Errors

If the output stream encounters an error, an error is returned.

Loading content...

Provided methods

pub fn puts<T: AsRef<[u8]>>(&mut self, message: T) -> Result<(), Self::Error>[src]

Writes the given bytes to the interpreter stdout stream followed by a newline.

This default implementation uses two calls to Io::print.

Errors

If the output stream encounters an error, an error is returned.

Loading content...

Implementors

Loading content...