Skip to main content

RelayedRequest

Trait RelayedRequest 

Source
pub trait RelayedRequest: Relayed {
    // Required methods
    fn encode_value(value: &Self::Value) -> String;
    fn decode_value(text: &str) -> Result<Self::Value, String>;
}
Expand description

A request point that can be answered by another process (Relay::answer): its value, as well as its input, written as text and read back.

The value goes out with the ask (what the asking side’s listeners left before the far side’s turn) and comes back with the answer (what the far side’s listeners left). The same rules as Relayed hold for versions: accept unknown fields, fail only on a value that cannot be used.

Required Methods§

Source

fn encode_value(value: &Self::Value) -> String

The value as text.

Source

fn decode_value(text: &str) -> Result<Self::Value, String>

The value read back from text, or why it cannot be.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§