pub struct AbiReader<'i> { /* private fields */ }
Expand description
View into RLP data, which provides method to read typed items from it
Implementations§
source§impl<'i> AbiReader<'i>
impl<'i> AbiReader<'i>
sourcepub fn new_call(buf: &'i [u8]) -> Result<(Bytes4, Self)>
pub fn new_call(buf: &'i [u8]) -> Result<(Bytes4, Self)>
Start reading RLP buffer, parsing first 4 bytes as selector
Errors
Fails if provided buffer has not enough length for selector+data
sourcepub fn read_usize(&mut self) -> Result<usize>
👎Deprecated: dangerous, as usize may have different width in wasm and native execution
pub fn read_usize(&mut self) -> Result<usize>
Read usize
at current position, then advance
sourcepub fn bytes_read(&mut self, size: usize)
pub fn bytes_read(&mut self, size: usize)
Notify about readed data portion.
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Is this parser reached end of buffer?