Skip to main content

LocationProvider

Trait LocationProvider 

Source
pub trait LocationProvider: Send + Sync {
    // Required methods
    fn get(&self, name: &str) -> Option<Arc<Location>>;
    fn stats(&self) -> HashMap<String, LocationStats>;
}
Expand description

Location provider trait

Required Methods§

Source

fn get(&self, name: &str) -> Option<Arc<Location>>

Get a location by name

§Arguments
  • name - The name of the location to get
§Returns
  • Option<Arc<Location>> - The location if found, None otherwise
Source

fn stats(&self) -> HashMap<String, LocationStats>

Get the stats of the locations

§Returns
  • HashMap<String, LocationStats> - The stats of the locations

Implementors§