Enum ink_metadata::LangError
source · #[non_exhaustive]
pub enum LangError {
CouldNotReadInput,
}
Expand description
An error emitted by the smart contracting language.
This is different than errors from:
- Errors from the contract, which are programmer defined
- Errors from the underlying execution environment (e.g
pallet-contracts
)
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations
sourceimpl Decode for LangError
impl Decode for LangError
sourcefn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<LangError, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<LangError, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
sourceimpl Encode for LangError
impl Encode for LangError
sourcefn encode_to<__CodecOutputEdqy>(&self, __codec_dest_edqy: &mut __CodecOutputEdqy)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(&self, __codec_dest_edqy: &mut __CodecOutputEdqy)where
__CodecOutputEdqy: Output + ?Sized,
Convert self to a slice and append it to the destination.
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl Copy for LangError
impl EncodeLike<LangError> for LangError
impl Eq for LangError
impl StructuralEq for LangError
impl StructuralPartialEq for LangError
Auto Trait Implementations
impl RefUnwindSafe for LangError
impl Send for LangError
impl Sync for LangError
impl Unpin for LangError
impl UnwindSafe for LangError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read moreimpl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
fn decode_all_with_depth_limit(limit: u32, input: &mut &[u8]) -> Result<T, Error>
fn decode_all_with_depth_limit(limit: u32, input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read morefn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where
I: Input,
fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where
I: Input,
Decode
Self
with the given maximum recursion depth and advance input
by the number of
bytes consumed. Read moreimpl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8, Global>
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8, Global>
Return an encoding of
Self
prepended by given slice.