Skip to main content

ReadService

Trait ReadService 

Source
pub trait ReadService:
    Send
    + Sync
    + 'static {
    type Request: DeserializeOwned + Send + 'static;

    // Required method
    fn read(&self, request: Self::Request) -> Result<Value, String>;

    // Provided method
    fn read_monitored(
        &self,
        request: Self::Request,
        monitor: &dyn CallMonitor,
    ) -> Result<Value, String> { ... }
}
Expand description

A board’s read actions. Request is a strict, action-tagged enum, so an unknown action or field is refused before any service call.

Required Associated Types§

Required Methods§

Source

fn read(&self, request: Self::Request) -> Result<Value, String>

Provided Methods§

Source

fn read_monitored( &self, request: Self::Request, monitor: &dyn CallMonitor, ) -> Result<Value, String>

Boards with cancellable clients override this without changing older tools.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§