Enum binary_sv2::CError

source ·
#[repr(C)]
pub enum CError {
Show 24 variants OutOfBound, NotABool(u8), WriteError(usize, usize), U24TooBig(u32), InvalidSignatureSize(usize), InvalidU256(usize), InvalidU24(u32), InvalidB0255Size(usize), InvalidB064KSize(usize), InvalidB016MSize(usize), InvalidSeq0255Size(usize), NonPrimitiveTypeCannotBeEncoded, PrimitiveConversionError, DecodableConversionError, UnInitializedDecoder, IoError, ReadError(usize, usize), VoidFieldMarker, ValueExceedsMaxSize(bool, usize, usize, usize, CVec, usize), SeqExceedsMaxSize, NoDecodableFieldPassed, ValueIsNotAValidProtocol(u8), UnknownMessageType(u8), Sv2OptionHaveMoreThenOneElement(u8),
}
Expand description

FFI-safe Error

Variants§

§

OutOfBound

§

NotABool(u8)

§

WriteError(usize, usize)

-> (expected size, actual size)

§

U24TooBig(u32)

§

InvalidSignatureSize(usize)

§

InvalidU256(usize)

§

InvalidU24(u32)

§

InvalidB0255Size(usize)

§

InvalidB064KSize(usize)

§

InvalidB016MSize(usize)

§

InvalidSeq0255Size(usize)

§

NonPrimitiveTypeCannotBeEncoded

Error when trying to encode a non-primitive data type

§

PrimitiveConversionError

§

DecodableConversionError

§

UnInitializedDecoder

§

IoError

§

ReadError(usize, usize)

§

VoidFieldMarker

§

ValueExceedsMaxSize(bool, usize, usize, usize, CVec, usize)

Error when Inner type value exceeds max size. (ISFIXED, SIZE, HEADERSIZE, MAXSIZE, bad value vec, bad value length)

§

SeqExceedsMaxSize

Error when sequence value (Seq0255, Seq064K) exceeds max size

§

NoDecodableFieldPassed

§

ValueIsNotAValidProtocol(u8)

§

UnknownMessageType(u8)

§

Sv2OptionHaveMoreThenOneElement(u8)

Trait Implementations§

source§

impl Debug for CError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Drop for CError

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<Error> for CError

source§

fn from(e: Error) -> CError

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for CError

§

impl RefUnwindSafe for CError

§

impl !Send for CError

§

impl !Sync for CError

§

impl Unpin for CError

§

impl UnwindSafe for CError

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.