pub enum TransactionPayloadDecoderError {
Show 15 variants
PayloadTooSmall,
TooManyArguments(u8),
InvalidSlotTag(u8),
InvalidInputTag(u8),
InvalidOutputTag(u8),
OutputIndexNotFound(u8),
OutputUsedTwice(u8),
OutputReferencedBySameMethod(u8),
ReturnValueNotLast(u8),
ReturnValueTooLarge {
output_index: u8,
size: u32,
},
InvalidSlotOutputIndexSize {
output_index: u8,
size: u32,
},
InvalidMethodContext(u8),
OutputBufferTooSmall,
TooManyDeclaredOutputs(u8),
FailedEarlier,
}Expand description
Errors of decoding a payload with TransactionPayloadDecoder or
TransactionPayloadCaller, whose constructors already read the declared outputs
Variants§
PayloadTooSmall
Payload too small
TooManyArguments(u8)
Too many arguments
InvalidSlotTag(u8)
A slot tag that TransactionSlot::from_u8() rejects
InvalidInputTag(u8)
An input tag that TransactionInput::from_u8() rejects
InvalidOutputTag(u8)
An output tag that TransactionOutput::from_u8() rejects
OutputIndexNotFound(u8)
A method writes an output that the payload doesn’t declare, or a slot or an input refers to an output that the payload doesn’t declare or that no earlier method wrote
OutputUsedTwice(u8)
A method writes the output with this index more than once, as #[output] or return value
OutputReferencedBySameMethod(u8)
A slot or an input refers to the output with this index, which the same method writes as
#[output] or return value
ReturnValueNotLast(u8)
The return value with this output index is followed by another output of its method, while a method has at most one return value, which is its last output
ReturnValueTooLarge
The size that the payload declares for a return value exceeds the capacity of its output.
The capacity is not included, so that errors fit into 8 bytes, which keeps decoding fast.
InvalidSlotOutputIndexSize
An output used as a slot doesn’t have the size of an address: the payload declares a
different size for a return value, or a method wrote a different size into its #[output]
InvalidMethodContext(u8)
Invalid method context
OutputBufferTooSmall
The declared outputs don’t fit into the output buffer of TransactionPayloadCaller
TooManyDeclaredOutputs(u8)
The payload declares more than MAX_OUTPUTS outputs
FailedEarlier
Decoding failed before, so the decoder can’t continue
Trait Implementations§
Source§impl Clone for TransactionPayloadDecoderError
impl Clone for TransactionPayloadDecoderError
Source§fn clone(&self) -> TransactionPayloadDecoderError
fn clone(&self) -> TransactionPayloadDecoderError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TransactionPayloadDecoderError
impl Eq for TransactionPayloadDecoderError
Source§impl Error for TransactionPayloadDecoderError
impl Error for TransactionPayloadDecoderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for TransactionPayloadDecoderError
Auto Trait Implementations§
impl Freeze for TransactionPayloadDecoderError
impl RefUnwindSafe for TransactionPayloadDecoderError
impl Send for TransactionPayloadDecoderError
impl Sync for TransactionPayloadDecoderError
impl Unpin for TransactionPayloadDecoderError
impl UnsafeUnpin for TransactionPayloadDecoderError
impl UnwindSafe for TransactionPayloadDecoderError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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