Struct rlp::RlpStream
[−]
[src]
pub struct RlpStream { /* fields omitted */ }
Appendable rlp encoder.
Methods
impl RlpStream
[src]
Trait Implementations
impl Default for RlpStream
[src]
impl Stream for RlpStream
[src]
fn new() -> Self
Initializes instance of empty Stream
.
fn new_list(len: usize) -> Self
Initializes the Stream
as a list.
fn append<'a, E>(&'a mut self, value: &E) -> &'a mut Self where E: RlpEncodable
Apends value to the end of stream, chainable. Read more
fn begin_list(&mut self, len: usize) -> &mut RlpStream
Declare appending the list of given size, chainable. Read more
fn append_empty_data(&mut self) -> &mut RlpStream
Apends null to the end of stream, chainable. Read more
fn append_raw<'a>(&'a mut self,
bytes: &[u8],
item_count: usize)
-> &'a mut RlpStream
bytes: &[u8],
item_count: usize)
-> &'a mut RlpStream
Appends raw (pre-serialised) RLP data. Use with caution. Chainable.
fn clear(&mut self)
Clear the output stream so far. Read more
fn is_finished(&self) -> bool
Returns true if stream doesnt expect any more items. Read more
fn as_raw(&self) -> &[u8]
Get raw encoded bytes
fn out(self) -> Vec<u8>
Streams out encoded bytes. Read more