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§
type Request: DeserializeOwned + Send + 'static
Required Methods§
Provided Methods§
Sourcefn read_monitored(
&self,
request: Self::Request,
monitor: &dyn CallMonitor,
) -> Result<Value, String>
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".