makepad_wasm_bridge

Trait ToWasm

Source
pub trait ToWasm {
    // Required methods
    fn u32_size() -> usize;
    fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self;
    fn to_wasm_js_body(
        out: &mut WasmJSOutput,
        slot: usize,
        is_recur: bool,
        prop: &str,
        temp: usize,
    );

    // Provided methods
    fn type_name() -> &'static str { ... }
    fn live_id() -> LiveId { ... }
    fn to_js_code() -> String { ... }
}

Required Methods§

Source

fn u32_size() -> usize

Source

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, is_recur: bool, prop: &str, temp: usize, )

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToWasm for bool

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, _temp: usize, )

Source§

fn u32_size() -> usize

Source§

impl ToWasm for f32

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, _temp: usize, )

Source§

fn u32_size() -> usize

Source§

impl ToWasm for f64

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, _temp: usize, )

Source§

fn u32_size() -> usize

Source§

impl ToWasm for u32

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, _temp: usize, )

Source§

fn u32_size() -> usize

Source§

impl ToWasm for usize

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, _temp: usize, )

Source§

fn u32_size() -> usize

Source§

impl ToWasm for String

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, _temp: usize, )

Source§

fn u32_size() -> usize

Source§

impl<T> ToWasm for Option<T>
where T: ToWasm,

Source§

fn u32_size() -> usize

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, is_recur: bool, prop: &str, temp: usize, )

Source§

impl<T> ToWasm for Box<T>
where T: ToWasm,

Source§

fn u32_size() -> usize

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, temp: usize, )

Source§

impl<T> ToWasm for Vec<T>
where T: ToWasm,

Source§

fn u32_size() -> usize

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, _is_recur: bool, prop: &str, temp: usize, )

Source§

impl<T, const N: usize> ToWasm for [T; N]
where T: ToWasm,

Source§

fn u32_size() -> usize

Source§

fn read_to_wasm(inp: &mut ToWasmMsgRef<'_>) -> Self

Source§

fn to_wasm_js_body( out: &mut WasmJSOutput, slot: usize, is_recur: bool, prop: &str, temp: usize, )

Implementors§