pub enum ZeckFormatError {
HeaderTooShort {
actual_length: usize,
required_length: usize,
},
UnsupportedVersion {
found_version: u8,
supported_version: u8,
},
ReservedFlagsSet {
flags: u8,
},
CompressionFailed {
original_size: usize,
be_size: usize,
le_size: usize,
},
DecompressedTooLarge {
expected_size: usize,
actual_size: usize,
},
DataSizeTooLarge {
size: usize,
},
}Expand description
Errors that can occur when parsing or processing .zeck files.
Variants§
HeaderTooShort
The input data is too short to contain a valid header.
Fields
UnsupportedVersion
The file format version in the header is not supported.
Fields
ReservedFlagsSet
The reserved flags in the header are set (indicating a newer format version).
CompressionFailed
Compression did not reduce the size of the data.
Fields
DecompressedTooLarge
Decompressed data size is larger than the original size specified in the header.
DataSizeTooLarge
The input data size is too large to be represented in the file format header.
Trait Implementations§
Source§impl Clone for ZeckFormatError
impl Clone for ZeckFormatError
Source§fn clone(&self) -> ZeckFormatError
fn clone(&self) -> ZeckFormatError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZeckFormatError
impl Debug for ZeckFormatError
Source§impl<'de> Deserialize<'de> for ZeckFormatError
impl<'de> Deserialize<'de> for ZeckFormatError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ZeckFormatError
impl Display for ZeckFormatError
Source§impl Error for ZeckFormatError
impl Error for ZeckFormatError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ZeckFormatError> for JsValuewhere
ZeckFormatError: Serialize,
impl From<ZeckFormatError> for JsValuewhere
ZeckFormatError: Serialize,
Source§fn from(value: ZeckFormatError) -> Self
fn from(value: ZeckFormatError) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
impl FromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &ZeckFormatErrorwhere
ZeckFormatError: Serialize,
impl IntoWasmAbi for &ZeckFormatErrorwhere
ZeckFormatError: Serialize,
Source§impl IntoWasmAbi for ZeckFormatErrorwhere
ZeckFormatError: Serialize,
impl IntoWasmAbi for ZeckFormatErrorwhere
ZeckFormatError: Serialize,
Source§impl OptionFromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for ZeckFormatErrorwhere
ZeckFormatError: Serialize,
impl OptionIntoWasmAbi for ZeckFormatErrorwhere
ZeckFormatError: Serialize,
Source§impl PartialEq for ZeckFormatError
impl PartialEq for ZeckFormatError
Source§impl RefFromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<ZeckFormatError>
type Anchor = SelfOwner<ZeckFormatError>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for ZeckFormatError
impl Serialize for ZeckFormatError
Source§impl Tsify for ZeckFormatError
impl Tsify for ZeckFormatError
const DECL: &'static str = "/**\n * Errors that can occur when parsing or processing .zeck files.\n */\nexport type ZeckFormatError = { HeaderTooShort: { actual_length: number; required_length: number } } | { UnsupportedVersion: { found_version: number; supported_version: number } } | { ReservedFlagsSet: { flags: number } } | { CompressionFailed: { original_size: number; be_size: number; le_size: number } } | { DecompressedTooLarge: { expected_size: number; actual_size: number } } | { DataSizeTooLarge: { size: number } };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for ZeckFormatErrorwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for ZeckFormatErrorwhere
ZeckFormatError: Serialize,
impl VectorIntoWasmAbi for ZeckFormatErrorwhere
ZeckFormatError: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for ZeckFormatError
impl WasmDescribeVector for ZeckFormatError
impl StructuralPartialEq for ZeckFormatError
Auto Trait Implementations§
impl Freeze for ZeckFormatError
impl RefUnwindSafe for ZeckFormatError
impl Send for ZeckFormatError
impl Sync for ZeckFormatError
impl Unpin for ZeckFormatError
impl UnwindSafe for ZeckFormatError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.