Enum fidl_next::decode::DecodeError
source · pub enum DecodeError {
Show 19 variants
RequiredHandleAbsent,
RequiredValueAbsent,
InvalidBool(u8),
InvalidHandlePresence(u32),
InvalidPointerPresence(u64),
InvalidEnvelopeSize(u32),
InvalidEnumOrdinal(usize),
InvalidUnionOrdinal(usize),
OutOfLineValueTooSmall(u32),
InlineValueTooBig(usize),
IncorrectNumberOfHandlesConsumed {
expected: usize,
actual: usize,
},
InvalidOptionalSize(u64),
VectorTooLong {
size: u64,
limit: u64,
},
InvalidUtf8(Utf8Error),
InvalidUnionEnvelope,
InsufficientData,
InsufficientHandles,
ExtraBytes {
num_extra: usize,
},
ExtraHandles {
num_extra: usize,
},
}
Expand description
Errors that can be produced when decoding FIDL messages.
Variants§
RequiredHandleAbsent
A required handle was absent
RequiredValueAbsent
A required value was absent
InvalidBool(u8)
A boolean was set to a value other than 0 or 1
InvalidHandlePresence(u32)
A handle was set to a value other than 0 or u32::MAX
InvalidPointerPresence(u64)
A pointer was set to a value other than 0 or u64::MAX
InvalidEnvelopeSize(u32)
An envelope had an invalid size
InvalidEnumOrdinal(usize)
An enum had an invalid ordinal
InvalidUnionOrdinal(usize)
A union had an invalid ordinal
OutOfLineValueTooSmall(u32)
An envelope was out-of-line, but the out-of-line data was too small
InlineValueTooBig(usize)
An envelope had inline data that was too big
IncorrectNumberOfHandlesConsumed
An envelope consumed a different number of handles than it indicated in its metadata
Fields
InvalidOptionalSize(u64)
An optional value was marked absent but its size was non-zero
VectorTooLong
A vector had a length greater than its allowed limit
InvalidUtf8(Utf8Error)
A string contained non-UTF8 data
InvalidUnionEnvelope
A union was marked absent, but its envelope was not set to zero
InsufficientData
The decoder ran out of data before decoding finished
InsufficientHandles
The decoder ran out of handles before decoding finished
ExtraBytes
Decoding finished without consuming all of the bytes
ExtraHandles
Decoding finished without consuming all of the handles