pub trait Engine: Send + Sync {
// Required method
fn send_message_cbor<'life0, 'life1, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
params: CborValue,
) -> Pin<Box<dyn Future<Output = Result<CborValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn send_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Wire abstraction for SurrealDB RPC. The CBOR method is the real wire path; the JSON method is a default convenience that transcodes through it.
Required Methods§
fn send_message_cbor<'life0, 'life1, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
params: CborValue,
) -> Pin<Box<dyn Future<Output = Result<CborValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn send_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".