pub struct BitSequence<'scale> { /* private fields */ }
Expand description
This represents a BitSequence, deferring decoding until the implementation wants to.
Implementations§
Source§impl<'scale> BitSequence<'scale>
impl<'scale> BitSequence<'scale>
Sourcepub fn bytes_from_start(&self) -> &'scale [u8]
pub fn bytes_from_start(&self) -> &'scale [u8]
The bytes left in the input, starting from this bit sequence.
Sourcepub fn bytes_after(&self) -> Result<&'scale [u8], DecodeError>
pub fn bytes_after(&self) -> Result<&'scale [u8], DecodeError>
The bytes after this bit sequence. Note that at present, this needs to
decode the bit sequence fully, so if you intend to do that anyway, call
decode
first to cache this result and save repeating the effort here.
Sourcepub fn decode(&mut self) -> Result<Decoder<'scale>, DecodeError>
pub fn decode(&mut self) -> Result<Decoder<'scale>, DecodeError>
Return a decoder to decode the bits in this bit sequence.
Auto Trait Implementations§
impl<'scale> Freeze for BitSequence<'scale>
impl<'scale> RefUnwindSafe for BitSequence<'scale>
impl<'scale> Send for BitSequence<'scale>
impl<'scale> Sync for BitSequence<'scale>
impl<'scale> Unpin for BitSequence<'scale>
impl<'scale> UnwindSafe for BitSequence<'scale>
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