Trait utf16_ext::Utf16WriteExt
[−]
[src]
pub trait Utf16WriteExt: WriteBytesExt { fn write_shorts<T: ByteOrder>(&mut self, buf: &[u16]) -> Result<usize> { ... } fn write_all_shorts<T: ByteOrder>(&mut self, buf: &[u16]) -> Result<()> { ... } fn write_bom<T: ByteOrder>(&mut self) -> Result<()> { ... } fn write_utf16_string<'a, T: ByteOrder>(
&mut self,
s: &'a str
) -> Result<Utf16Written<'a>> { ... } }
An extension of std::io::Write
for utf16
Provided Methods
fn write_shorts<T: ByteOrder>(&mut self, buf: &[u16]) -> Result<usize>
Like Write::write
but with u16
s
fn write_all_shorts<T: ByteOrder>(&mut self, buf: &[u16]) -> Result<()>
Like Write::write_all
but with u16
s
fn write_bom<T: ByteOrder>(&mut self) -> Result<()>
Writes a byte order maker character
fn write_utf16_string<'a, T: ByteOrder>(
&mut self,
s: &'a str
) -> Result<Utf16Written<'a>>
&mut self,
s: &'a str
) -> Result<Utf16Written<'a>>
Writes a string as UTF-16
Returns Ok(len) of the string written so far
Implementors
impl<T: Write> Utf16WriteExt for T