Struct sfo_http::http_util::codegen::WriterGenerator
source · pub struct WriterGenerator<'a, W>where
W: 'a + Write,{ /* private fields */ }Expand description
Writer Generator, this uses a custom writer to store the JSON result.
Implementations§
source§impl<'a, W> WriterGenerator<'a, W>where
W: 'a + Write,
impl<'a, W> WriterGenerator<'a, W>where W: 'a + Write,
pub fn new(writer: &'a mut W) -> WriterGenerator<'a, W>
Trait Implementations§
source§impl<'a, W> Generator for WriterGenerator<'a, W>where
W: Write,
impl<'a, W> Generator for WriterGenerator<'a, W>where W: Write,
type T = W
fn get_writer(&mut self) -> &mut W
fn write_min(&mut self, _: &[u8], min: u8) -> Result<(), Error>
fn write(&mut self, slice: &[u8]) -> Result<(), Error>
fn write_char(&mut self, ch: u8) -> Result<(), Error>
fn new_line(&mut self) -> Result<(), Error>
fn indent(&mut self)
fn dedent(&mut self)
fn write_string_complex( &mut self, string: &str, start: usize ) -> Result<(), Error>
fn write_string(&mut self, string: &str) -> Result<(), Error>
fn write_number(&mut self, num: &Number) -> Result<(), Error>
fn write_object(&mut self, object: &Object) -> Result<(), Error>
fn write_json(&mut self, json: &JsonValue) -> Result<(), Error>
Auto Trait Implementations§
impl<'a, W> RefUnwindSafe for WriterGenerator<'a, W>where W: RefUnwindSafe,
impl<'a, W> Send for WriterGenerator<'a, W>where W: Send,
impl<'a, W> Sync for WriterGenerator<'a, W>where W: Sync,
impl<'a, W> Unpin for WriterGenerator<'a, W>
impl<'a, W> !UnwindSafe for WriterGenerator<'a, W>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more