RemoteQuerySubscriber

Trait RemoteQuerySubscriber 

Source
pub trait RemoteQuerySubscriber:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn subscription_established<'life0, 'async_trait>(
        &'life0 self,
        version: u32,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_last_error(&self, error: RetrievalError);
}
Expand description

Trait for query initialization that can be driven by SubscriptionRelay Abstracts the relay’s interaction with LiveQuery

Required Methods§

Source

fn subscription_established<'life0, 'async_trait>( &'life0 self, version: u32, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called after remote subscription deltas have been applied Dispatches to initialize (version 1) or update_selection_init (version >1) internally Handles marking initialization as complete and setting last_error on failure

Source

fn set_last_error(&self, error: RetrievalError)

Set the last error for this subscription

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§