Trait RemoteOrigins

Source
pub trait RemoteOrigins {
    type Error: Error + Debug;

    // Required methods
    fn list_servers<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashSet<Origin>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_server<'life0, 'async_trait>(
        &'life0 mut self,
        origin: Origin,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn replace_server<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        old_origin: &'life1 Origin,
        new_origin: Origin,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_server<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        origin: &'life1 Origin,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Manage a collection of server origins.

Required Associated Types§

Source

type Error: Error + Debug

Error type.

Required Methods§

Source

fn list_servers<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashSet<Origin>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List server origins from the backing storage.

Source

fn add_server<'life0, 'async_trait>( &'life0 mut self, origin: Origin, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add a server origin to the backing storage.

Source

fn replace_server<'life0, 'life1, 'async_trait>( &'life0 mut self, old_origin: &'life1 Origin, new_origin: Origin, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update a server origin in the backing storage.

Source

fn remove_server<'life0, 'life1, 'async_trait>( &'life0 mut self, origin: &'life1 Origin, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove a server origin from the backing storage.

Implementors§