Post

Trait Post 

Source
pub trait Post: AsJs {
    // Provided method
    fn transferables(&self) -> Array { ... }
}
Expand description

Objects that can be sent via postMessage. A type that is Post supports being serialized into a JavaScript object that can be sent using postMessage, and also getting an array of subobjects that must be transferred.

Provided Methods§

Source

fn transferables(&self) -> Array

Get a list of the objects that must be transferred when calling postMessage.

The default implementation returns an empty array.

Implementations on Foreign Types§

Source§

impl Post for i8

Source§

impl Post for i16

Source§

impl Post for i32

Source§

impl Post for i64

Source§

impl Post for i128

Source§

impl Post for u8

Source§

impl Post for u16

Source§

impl Post for u32

Source§

impl Post for u64

Source§

impl Post for u128

Source§

impl Post for ()

Source§

impl Post for String

Source§

impl<T: Post, E: Post> Post for Result<T, E>
where Result<T, E>: AsJs,

Implementors§