pub trait StrWrite {
type Error;
// Required methods
fn write_str(&mut self, s: &str) -> Result<(), Self::Error>;
fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Self::Error>;
}Expand description
Trait that allows writing string slices. This is basically an extension
of std::io::Write in order to include String.
Required Associated Types§
Required Methods§
fn write_str(&mut self, s: &str) -> Result<(), Self::Error>
fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".