Trait encoding::types::StringWriter [−][src]
pub trait StringWriter { fn write_char(&mut self, c: char); fn write_str(&mut self, s: &str); fn writer_hint(&mut self, _expectedlen: usize) { ... } }
String writer used by decoders. In most cases this will be an owned string.
Required Methods
fn write_char(&mut self, c: char)
Writes a single character.
fn write_str(&mut self, s: &str)
Writes a string.
Provided Methods
fn writer_hint(&mut self, _expectedlen: usize)
Hints an expected lower bound on the length (in bytes) of the output
until the next call to writer_hint
,
so that the writer can reserve the memory for writing.
RawDecoder
s are recommended but not required to call this method
with an appropriate estimate.
By default this method does nothing.
Implementations on Foreign Types
impl StringWriter for String
[src]
impl StringWriter for String
fn writer_hint(&mut self, expectedlen: usize)
[src]
fn writer_hint(&mut self, expectedlen: usize)
fn write_char(&mut self, c: char)
[src]
fn write_char(&mut self, c: char)
fn write_str(&mut self, s: &str)
[src]
fn write_str(&mut self, s: &str)