pub trait Output:
Send
+ Sync
+ Debug {
// Required methods
fn write_stdout<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()>;
fn write_stderr<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()>;
// Provided methods
fn print<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()> { ... }
fn puts<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()> { ... }
}
Required Methods§
fn write_stdout<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()>
fn write_stderr<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()>
Provided Methods§
fn print<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()>
fn puts<T: AsRef<[u8]>>(&mut self, bytes: T) -> Result<()>
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.