Skip to main content

ReadTransport

Trait ReadTransport 

Source
pub trait ReadTransport:
    Send
    + Sync
    + 'static {
    // Required methods
    fn serves(&self, command: &str) -> bool;
    fn read(&self, command: &str, args: &Json) -> Result<Json, String>;
}
Expand description

What the host reads for the kernel: its node, its database, a service. Called away from the UI thread; may take its time.

Required Methods§

Source

fn serves(&self, command: &str) -> bool

Whether this transport reads command; the others are not the kernel’s.

Source

fn read(&self, command: &str, args: &Json) -> Result<Json, String>

Reads command with args (an object, {} without arguments).

§Errors

The read failed: the text is shown in place of the value, or beside the value kept from before.

Implementors§