pub trait RemotesManager:
Send
+ Sync
+ Lifecycle {
// Required methods
fn get_all(&self) -> Vec<InstanceInfo>;
fn get(&self, address: &InstanceAddress) -> Option<InstanceInfo>;
fn has(&self, address: &InstanceAddress) -> bool;
fn get_all_addresses(&self) -> HashSet<InstanceAddress>;
fn add<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<InstanceInfo, FailedToAddInstance>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove(&self, address: &InstanceAddress) -> bool;
fn remove_all(&self);
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<InstanceInfo, FailedToUpdateInstance>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<InstanceInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fetch_and_add_remotes_from_remote<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceInfo>, FailedToFetchRemoteInstances>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_and_add_remotes_from_all_remotes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<InstanceInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Manages the list of remote instances.
Required Methods§
Sourcefn get(&self, address: &InstanceAddress) -> Option<InstanceInfo>
fn get(&self, address: &InstanceAddress) -> Option<InstanceInfo>
Returns the instance info with the given address.
Sourcefn has(&self, address: &InstanceAddress) -> bool
fn has(&self, address: &InstanceAddress) -> bool
Returns true if the given address is registered.
Sourcefn get_all_addresses(&self) -> HashSet<InstanceAddress>
fn get_all_addresses(&self) -> HashSet<InstanceAddress>
Returns a list of the addresses of the remote instances.
Sourcefn add<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<InstanceInfo, FailedToAddInstance>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<InstanceInfo, FailedToAddInstance>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Adds a remote instance.
Sourcefn remove_all(&self)
fn remove_all(&self)
Removes all remote instances.
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<InstanceInfo, FailedToUpdateInstance>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<InstanceInfo, FailedToUpdateInstance>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates a remote instance.
Sourcefn update_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<InstanceInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<InstanceInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes all remote instances.
Sourcefn fetch_and_add_remotes_from_remote<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceInfo>, FailedToFetchRemoteInstances>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_and_add_remotes_from_remote<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 InstanceAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceInfo>, FailedToFetchRemoteInstances>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches and adds all remote instances of the given remote instance.