Struct chain_core::abor::Decoder
pub struct Decoder<'a> {
slice: &'a [u8],
}
Expand description
Create a decoder on some data
Fields§
§slice: &'a [u8]
Implementations§
§impl<'a> Decoder<'a>
impl<'a> Decoder<'a>
pub fn new(data: &'a [u8]) -> Decoder<'a>
pub fn array(&mut self) -> Result<usize, DecodeError>
pub fn u8(&mut self) -> Result<u8, DecodeError>
pub fn u16(&mut self) -> Result<u16, DecodeError>
pub fn u32(&mut self) -> Result<u32, DecodeError>
pub fn u64(&mut self) -> Result<u64, DecodeError>
pub fn u128(&mut self) -> Result<u128, DecodeError>
pub fn bytes(&mut self) -> Result<Box<[u8], Global>, DecodeError>
pub fn end(self) -> Result<(), DecodeError>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Decoder<'a>
impl<'a> Send for Decoder<'a>
impl<'a> Sync for Decoder<'a>
impl<'a> Unpin for Decoder<'a>
impl<'a> UnwindSafe for Decoder<'a>
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