web-codecs 0.3.0

WASM bindings for Web Codecs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use wasm_bindgen::prelude::*;

#[derive(Debug, thiserror::Error, Clone)]
pub enum Error {
    #[error("dropped")]
    Dropped,

    #[error("unknown error: {0:?}")]
    Unknown(JsValue),
}

impl From<JsValue> for Error {
    fn from(e: JsValue) -> Self {
        Self::Unknown(e)
    }
}