try_write_native

Function try_write_native 

Source
pub fn try_write_native<Wrt, W, T>(writer: &mut Wrt, v: T) -> Result<()>
where Wrt: Write + ?Sized, W: EndianWrite + TryFrom<T>, <W as TryFrom<T>>::Error: Display,
Available on crate feature io-std only.
Expand description

Like write_native, but uses TryFrom<T> for fallible conversion.

Conversion errors are mapped to io::ErrorKind::InvalidInput.