Skip to main content

Select

Trait Select 

Source
pub(super) trait Select: Send + Sync {
    // Required method
    fn candidates<'life0, 'life1, 'async_trait>(
        &'life0 self,
        opts: &'life1 Opts,
    ) -> Pin<Box<dyn Future<Output = Candidates> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Abstracts candidate enumeration for a federation fetch.

The production implementation derives the server pool from room state while tests substitute a fixed list.

Required Methods§

Source

fn candidates<'life0, 'life1, 'async_trait>( &'life0 self, opts: &'life1 Opts, ) -> Pin<Box<dyn Future<Output = Candidates> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns ranked, eligible servers for the supplied fetch options.

Implementations may use an explicit override or derive candidates from room membership and routing hints.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§