Skip to main content

Engine

Trait Engine 

Source
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§

Source

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§

Source

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,

Implementors§