pub struct Variant<'scale, 'resolver, R: TypeResolver> { /* private fields */ }
Expand description
A representation of the a variant type.
Implementations§
source§impl<'scale, 'resolver, R: TypeResolver> Variant<'scale, 'resolver, R>
impl<'scale, 'resolver, R: TypeResolver> Variant<'scale, 'resolver, R>
sourcepub fn skip_decoding(&mut self) -> Result<(), DecodeError>
pub fn skip_decoding(&mut self) -> Result<(), DecodeError>
Skip over all bytes associated with this variant. After calling this,
Self::bytes_from_undecoded()
will represent the bytes after this variant.
sourcepub fn bytes_from_start(&self) -> &'scale [u8] ⓘ
pub fn bytes_from_start(&self) -> &'scale [u8] ⓘ
The bytes representing this sequence and anything following it.
sourcepub fn bytes_from_undecoded(&self) -> &'scale [u8] ⓘ
pub fn bytes_from_undecoded(&self) -> &'scale [u8] ⓘ
The bytes that have not yet been decoded in this variant (this never includes the variant index at the front) and anything following it.
Auto Trait Implementations§
impl<'scale, 'resolver, R> Freeze for Variant<'scale, 'resolver, R>
impl<'scale, 'resolver, R> RefUnwindSafe for Variant<'scale, 'resolver, R>
impl<'scale, 'resolver, R> Send for Variant<'scale, 'resolver, R>
impl<'scale, 'resolver, R> Sync for Variant<'scale, 'resolver, R>
impl<'scale, 'resolver, R> Unpin for Variant<'scale, 'resolver, R>
impl<'scale, 'resolver, R> UnwindSafe for Variant<'scale, 'resolver, R>
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