pub struct StaticAstronomicalData {
pub pois: Vec<PointOfInterest>,
pub containers: Vec<ObjectContainer>,
pub poi_name_map: HashMap<String, usize>,
pub container_name_map: HashMap<String, usize>,
}Expand description
Default implementation of astronomical data provider
Fields§
§pois: Vec<PointOfInterest>§containers: Vec<ObjectContainer>§poi_name_map: HashMap<String, usize>§container_name_map: HashMap<String, usize>Implementations§
Source§impl StaticAstronomicalData
impl StaticAstronomicalData
pub fn new(pois: Vec<PointOfInterest>, containers: Vec<ObjectContainer>) -> Self
Trait Implementations§
Source§impl AstronomicalDataProvider for StaticAstronomicalData
impl AstronomicalDataProvider for StaticAstronomicalData
fn get_points_of_interest(&self) -> &[PointOfInterest]
fn get_object_containers(&self) -> &[ObjectContainer]
fn get_point_of_interest_by_name(&self, name: &str) -> Option<&PointOfInterest>
fn get_object_container_by_name(&self, name: &str) -> Option<&ObjectContainer>
Source§impl Clone for StaticAstronomicalData
impl Clone for StaticAstronomicalData
Source§fn clone(&self) -> StaticAstronomicalData
fn clone(&self) -> StaticAstronomicalData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticAstronomicalData
impl Debug for StaticAstronomicalData
Source§impl<'de> Deserialize<'de> for StaticAstronomicalData
impl<'de> Deserialize<'de> for StaticAstronomicalData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StaticAstronomicalData
impl RefUnwindSafe for StaticAstronomicalData
impl Send for StaticAstronomicalData
impl Sync for StaticAstronomicalData
impl Unpin for StaticAstronomicalData
impl UnwindSafe for StaticAstronomicalData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more