Trait RemoteEntityConfigProvider

Source
pub trait RemoteEntityConfigProvider {
    // Required methods
    fn get(&self, remote_id: u64) -> Option<&RemoteEntityConfig>;
    fn get_mut(&mut self, remote_id: u64) -> Option<&mut RemoteEntityConfig>;
    fn add_config(&mut self, cfg: &RemoteEntityConfig) -> bool;
    fn remove_config(&mut self, remote_id: u64) -> bool;
}

Required Methods§

Source

fn get(&self, remote_id: u64) -> Option<&RemoteEntityConfig>

Retrieve the remote entity configuration for the given remote ID.

Source

fn get_mut(&mut self, remote_id: u64) -> Option<&mut RemoteEntityConfig>

Source

fn add_config(&mut self, cfg: &RemoteEntityConfig) -> bool

Add a new remote configuration. Return true if the configuration was inserted successfully, and false if a configuration already exists.

Source

fn remove_config(&mut self, remote_id: u64) -> bool

Remote a configuration. Returns true if the configuration was removed successfully, and false if no configuration exists for the given remote ID.

Implementors§

Source§

impl RemoteEntityConfigProvider for RemoteEntityConfig

A remote entity configurations also implements the RemoteEntityConfigProvider, but the RemoteEntityConfigProvider::add_config and RemoteEntityConfigProvider::remove_config are no-ops and always returns false.

Source§

impl RemoteEntityConfigProvider for StdRemoteEntityConfigProvider

Available on crate feature std only.
Source§

impl RemoteEntityConfigProvider for VecRemoteEntityConfigProvider

Available on crate feature alloc only.