pub struct VariantBytes<'a> { /* private fields */ }Expand description
A variant read in place, as borrowed child bytes and signature.
decode splits the variant at its type separator and
checks that the signature is UTF-8. It parses neither the signature nor
the child, so it allocates nothing.
If a caller needs a checked child, the caller runs validate over the
whole serialized value first.
Implementations§
Source§impl<'a> VariantBytes<'a>
impl<'a> VariantBytes<'a>
Trait Implementations§
Source§impl<'a> Clone for VariantBytes<'a>
impl<'a> Clone for VariantBytes<'a>
impl<'a> Copy for VariantBytes<'a>
Source§impl<'a> GvDecode<'a> for VariantBytes<'a>
impl<'a> GvDecode<'a> for VariantBytes<'a>
Source§impl<'a> GvEncode for VariantBytes<'a>
impl<'a> GvEncode for VariantBytes<'a>
Source§impl<'a> GvType for VariantBytes<'a>
impl<'a> GvType for VariantBytes<'a>
Auto Trait Implementations§
impl<'a> Forget for VariantBytes<'a>
impl<'a> Freeze for VariantBytes<'a>
impl<'a> Move for VariantBytes<'a>
impl<'a> RefUnwindSafe for VariantBytes<'a>
impl<'a> Send for VariantBytes<'a>
impl<'a> Sync for VariantBytes<'a>
impl<'a> Unpin for VariantBytes<'a>
impl<'a> UnsafeUnpin for VariantBytes<'a>
impl<'a> UnwindSafe for VariantBytes<'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