[][src]Enum rask_wasm_shared::error::ClientError

pub enum ClientError {
    JsValueError(JsValue),
    WebSocketError(JsValue),
    WebGlError(String),
    ResourceError(String),
    EngineError(String),
}

Collection of frontend errors these can result form Network errors, other javascript errors or concurrency errors

they implement Display

Examples

use wasm_bindgen::JsValue;
use rask_wasm_shared::error::ClientError;

let err: Result<(), JsValue> = Err(JsValue::from_str("test error"));
if let Err(x) = err {
   return Err(ClientError::WebSocketError(x));
}
Ok(())

Variants

JsValueError(JsValue)
WebSocketError(JsValue)
WebGlError(String)
ResourceError(String)
EngineError(String)

Trait Implementations

impl Debug for ClientError[src]

impl Display for ClientError[src]

impl From<EngineError> for ClientError[src]

impl From<JsValue> for ClientError[src]

Auto Trait Implementations

impl RefUnwindSafe for ClientError

impl !Send for ClientError

impl !Sync for ClientError

impl Unpin for ClientError

impl UnwindSafe for ClientError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<S, T> Collide<[T]> for S where
    T: Collide<S>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,