pub trait OsWrite: Write {
// Provided method
fn write_all_os(&mut self, buf: &OsStr) -> Result<()> { ... }
}Expand description
io::Write, but for OS strings.
On Unix this works straightforwardly.
On Windows this currently returns an error if the OS string is not valid Unicode. This may in the future change to allow those strings to be written to consoles.
Provided Methods§
Sourcefn write_all_os(&mut self, buf: &OsStr) -> Result<()>
fn write_all_os(&mut self, buf: &OsStr) -> Result<()>
Write the entire OS string into this writer.
§Errors
An error is returned if the underlying I/O operation fails.
On Windows, if the OS string is not valid Unicode, an error of kind
io::ErrorKind::InvalidData is returned.