pub struct ArgumentsMetadataDecoder<'a, 'metadata> { /* private fields */ }Implementations§
Source§impl<'metadata> ArgumentsMetadataDecoder<'_, 'metadata>
impl<'metadata> ArgumentsMetadataDecoder<'_, 'metadata>
Sourcepub fn without_auto_drain(self) -> ManuallyDrop<Self>
pub fn without_auto_drain(self) -> ManuallyDrop<Self>
Get a wrapped value that does not automatically drain the metadata on drop.
The default behavior is to automatically drain the metadata on drop such that
contract/trait or method metadata decoding progresses successfully, even when the caller
doesn’t care about arguments. This, however, generates more code and causes difficulties for
LLVM when it tries to optimize the code and especially when trying to prove the lack of
panics. Usually this method is not needed, but if you are having difficulties with
no-panic and either decoding a single method or drain arguments explicitly, you can use
this helper method to work around compiler limitations.
Sourcepub fn remaining_metadata_bytes(&self) -> usize
pub fn remaining_metadata_bytes(&self) -> usize
The number of bytes left in the metadata that were not processed yet
pub fn decode_next<'a>( &'a mut self, ) -> Option<Result<ArgumentMetadataItem<'metadata>, MetadataDecodingError<'metadata>>>
Trait Implementations§
Source§impl<'a, 'metadata> Debug for ArgumentsMetadataDecoder<'a, 'metadata>
impl<'a, 'metadata> Debug for ArgumentsMetadataDecoder<'a, 'metadata>
Auto Trait Implementations§
impl<'a, 'metadata> Freeze for ArgumentsMetadataDecoder<'a, 'metadata>
impl<'a, 'metadata> RefUnwindSafe for ArgumentsMetadataDecoder<'a, 'metadata>
impl<'a, 'metadata> Send for ArgumentsMetadataDecoder<'a, 'metadata>
impl<'a, 'metadata> Sync for ArgumentsMetadataDecoder<'a, 'metadata>
impl<'a, 'metadata> Unpin for ArgumentsMetadataDecoder<'a, 'metadata>
impl<'a, 'metadata> !UnwindSafe for ArgumentsMetadataDecoder<'a, 'metadata>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more