Skip to main content

Wire

Trait Wire 

Source
pub trait Wire {
    // Required methods
    fn open(&self, method: &str, params: Value, sink: Sink) -> CallId;
    fn close(&self, call: CallId);
}
Expand description

The wire: the page’s one socket.

Required Methods§

Source

fn open(&self, method: &str, params: Value, sink: Sink) -> CallId

Calls method (tickets.list) with params, its items into sink.

Source

fn close(&self, call: CallId)

Stops the call (an unsubscribe); its sink hears nothing more.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<W: Wire + ?Sized> Wire for Rc<W>

Source§

fn open(&self, method: &str, params: Value, sink: Sink) -> CallId

Source§

fn close(&self, call: CallId)

Implementors§