Skip to main content

Error

Enum Error 

Source
pub enum Error<SerializationError, DeserializationError> {
    WrongType,
    SerializationError(SerializationError),
    DeserializationError(DeserializationError),
}
Expand description

Wrapper error for Transferable.

Variants§

§

WrongType

JsValue was not of an expected type.

§

SerializationError(SerializationError)

Error occurred during serialization of a message.

§

DeserializationError(DeserializationError)

Error occurred during deserialization of a message.

Trait Implementations§

Source§

impl<SerializationError: Debug, DeserializationError: Debug> Debug for Error<SerializationError, DeserializationError>

Source§

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

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

impl<SerializationError, DeserializationError> Display for Error<SerializationError, DeserializationError>
where SerializationError: Display, DeserializationError: Display,

Source§

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

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

impl<SerializationError, DeserializationError> Error for Error<SerializationError, DeserializationError>
where SerializationError: Debug + Display, DeserializationError: Debug + Display,

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Int8Array
where C: Codec,

Source§

type Input = Wrapper<C, Int8Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Uint8Array
where C: Codec,

Source§

type Input = Wrapper<C, Uint8Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Int16Array
where C: Codec,

Source§

type Input = Wrapper<C, Int16Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Uint16Array
where C: Codec,

Source§

type Input = Wrapper<C, Uint16Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Int32Array
where C: Codec,

Source§

type Input = Wrapper<C, Int32Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Uint32Array
where C: Codec,

Source§

type Input = Wrapper<C, Uint32Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Float16Array
where C: Codec,

Source§

type Input = Wrapper<C, Float16Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Float32Array
where C: Codec,

Source§

type Input = Wrapper<C, Float32Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Float64Array
where C: Codec,

Source§

type Input = Wrapper<C, Float64Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for BigInt64Array
where C: Codec,

Source§

type Input = Wrapper<C, BigInt64Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> FromTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for BigUint64Array
where C: Codec,

Source§

type Input = Wrapper<C, BigUint64Array>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<Codec, T> FromTransferable<Context<Codec>, Error<<Codec as Encode>::Error, <Codec as Decode>::Error>> for Wrapper<Codec, T>
where Codec: Codec, for<'de> T: Serialize + Deserialize<'de>,

Source§

type Input = Wrapper<Codec, T>

Type of input (Transferable) data.
Source§

fn from_transferable(input: Self::Input) -> Self

Reconstruct from Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Int8Array
where C: Codec,

Source§

type Output = Wrapper<C, Int8Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Uint8Array
where C: Codec,

Source§

type Output = Wrapper<C, Uint8Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Int16Array
where C: Codec,

Source§

type Output = Wrapper<C, Int16Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Uint16Array
where C: Codec,

Source§

type Output = Wrapper<C, Uint16Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Int32Array
where C: Codec,

Source§

type Output = Wrapper<C, Int32Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Uint32Array
where C: Codec,

Source§

type Output = Wrapper<C, Uint32Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Float16Array
where C: Codec,

Source§

type Output = Wrapper<C, Float16Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Float32Array
where C: Codec,

Source§

type Output = Wrapper<C, Float32Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for Float64Array
where C: Codec,

Source§

type Output = Wrapper<C, Float64Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for BigInt64Array
where C: Codec,

Source§

type Output = Wrapper<C, BigInt64Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<C> IntoTransferable<Context<C>, Error<<C as Encode>::Error, <C as Decode>::Error>> for BigUint64Array
where C: Codec,

Source§

type Output = Wrapper<C, BigUint64Array>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.
Source§

impl<Codec, T> IntoTransferable<Context<Codec>, Error<<Codec as Encode>::Error, <Codec as Decode>::Error>> for Wrapper<Codec, T>
where Codec: Codec, for<'de> T: Serialize + Deserialize<'de>,

Source§

type Output = Wrapper<Codec, T>

Type of output (Transferable) data.
Source§

fn into_transferable(self) -> Self::Output

Convert into Transferable data.

Auto Trait Implementations§

§

impl<SerializationError, DeserializationError> Freeze for Error<SerializationError, DeserializationError>
where SerializationError: Freeze, DeserializationError: Freeze,

§

impl<SerializationError, DeserializationError> RefUnwindSafe for Error<SerializationError, DeserializationError>
where SerializationError: RefUnwindSafe, DeserializationError: RefUnwindSafe,

§

impl<SerializationError, DeserializationError> Send for Error<SerializationError, DeserializationError>
where SerializationError: Send, DeserializationError: Send,

§

impl<SerializationError, DeserializationError> Sync for Error<SerializationError, DeserializationError>
where SerializationError: Sync, DeserializationError: Sync,

§

impl<SerializationError, DeserializationError> Unpin for Error<SerializationError, DeserializationError>
where SerializationError: Unpin, DeserializationError: Unpin,

§

impl<SerializationError, DeserializationError> UnsafeUnpin for Error<SerializationError, DeserializationError>
where SerializationError: UnsafeUnpin, DeserializationError: UnsafeUnpin,

§

impl<SerializationError, DeserializationError> UnwindSafe for Error<SerializationError, DeserializationError>
where SerializationError: UnwindSafe, DeserializationError: UnwindSafe,

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> ConditionalSend for T

Source§

impl<T> Error for T
where T: ConditionalSend + 'static,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more