Skip to main content

BootstrapProvider

Trait BootstrapProvider 

Source
pub trait BootstrapProvider: Send + Sync {
    // Required method
    fn bootstrap<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request: BootstrapRequest,
        context: &'life1 BootstrapContext,
        event_tx: BootstrapEventSender,
        settings: Option<&'life2 SourceSubscriptionSettings>,
    ) -> Pin<Box<dyn Future<Output = Result<BootstrapResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Bootstrap provider trait for implementing bootstrap plugins Trait for bootstrap providers that handle initial data delivery for newly subscribed queries.

Required Methods§

Source

fn bootstrap<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: BootstrapRequest, context: &'life1 BootstrapContext, event_tx: BootstrapEventSender, settings: Option<&'life2 SourceSubscriptionSettings>, ) -> Pin<Box<dyn Future<Output = Result<BootstrapResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Perform bootstrap operation for the given request. Sends bootstrap events to the provided channel. Returns a [BootstrapResult] carrying the event count and handover metadata.

§Arguments
  • request - Bootstrap request with query ID and labels
  • context - Bootstrap context with source information
  • event_tx - Channel to send bootstrap events
  • settings - Optional subscription settings with additional query context

Trait Implementations§

Source§

impl BootstrapProvider for Box<dyn BootstrapProvider>

Blanket implementation of BootstrapProvider for boxed trait objects. This allows Box<dyn BootstrapProvider> to be used where BootstrapProvider is expected.

Source§

fn bootstrap<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: BootstrapRequest, context: &'life1 BootstrapContext, event_tx: BootstrapEventSender, settings: Option<&'life2 SourceSubscriptionSettings>, ) -> Pin<Box<dyn Future<Output = Result<BootstrapResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Perform bootstrap operation for the given request. Sends bootstrap events to the provided channel. Returns a [BootstrapResult] carrying the event count and handover metadata. Read more

Implementations on Foreign Types§

Source§

impl BootstrapProvider for Box<dyn BootstrapProvider>

Blanket implementation of BootstrapProvider for boxed trait objects. This allows Box<dyn BootstrapProvider> to be used where BootstrapProvider is expected.

Source§

fn bootstrap<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: BootstrapRequest, context: &'life1 BootstrapContext, event_tx: BootstrapEventSender, settings: Option<&'life2 SourceSubscriptionSettings>, ) -> Pin<Box<dyn Future<Output = Result<BootstrapResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§