Struct parity_wasm::elements::CountedWriter [−][src]
pub struct CountedWriter<'a, W: 'a + Write> { /* fields omitted */ }
Helper struct to write payload which is preceded by it's own length in bytes.
Methods
impl<'a, W: 'a + Write> CountedWriter<'a, W>
[src]
impl<'a, W: 'a + Write> CountedWriter<'a, W>
pub fn new(writer: &'a mut W) -> Self
[src]
pub fn new(writer: &'a mut W) -> Self
New counted writer on top of the given serial writer
pub fn done(self) -> Result<(), Error>
[src]
pub fn done(self) -> Result<(), Error>
Finish counted writer routing, which writes accumulated length and actual payload.
Trait Implementations
impl<'a, W: Debug + 'a + Write> Debug for CountedWriter<'a, W>
[src]
impl<'a, W: Debug + 'a + Write> Debug for CountedWriter<'a, W>
Auto Trait Implementations
impl<'a, W> Send for CountedWriter<'a, W> where
W: Send,
impl<'a, W> Send for CountedWriter<'a, W> where
W: Send,
impl<'a, W> Sync for CountedWriter<'a, W> where
W: Sync,
impl<'a, W> Sync for CountedWriter<'a, W> where
W: Sync,