pub struct LiveStateResolver {
pub touchdown_locations: Vec<TouchdownLocation>,
pub organic_locations: Vec<OrganicLocation>,
pub status: Option<Status>,
pub modules_info: Option<ModulesInfo>,
pub cargo: Option<Cargo>,
pub nav_route: Option<NavRoute>,
pub outfitting: Option<Outfitting>,
pub shipyard: Option<Shipyard>,
pub market: Option<Market>,
pub backpack: Option<Backpack>,
pub ship_locker: Option<ShipLocker>,
pub last_ship_status: Option<ShipStatus>,
}
Expand description
Life state tracks state from the logs and combines them with state from live files like for example the status.json file to provide more context in some instances. Something that is special about this state it that is cannot be constructed from just the log files, so this is the only state that can de Serialized and importantly Deserialized. This way state can be saved to disk and retrieved at a later time when you want to continue with the same state.
Fields§
§touchdown_locations: Vec<TouchdownLocation>
The locations where the player has landed on planets.
organic_locations: Vec<OrganicLocation>
The locations of scanned organics on different planets.
status: Option<Status>
§modules_info: Option<ModulesInfo>
§cargo: Option<Cargo>
§outfitting: Option<Outfitting>
§shipyard: Option<Shipyard>
§market: Option<Market>
§backpack: Option<Backpack>
§ship_locker: Option<ShipLocker>
§last_ship_status: Option<ShipStatus>
This field keeps track of the last known ship status. This can be used to access information about the player’s ship when the player is on-foot.
Implementations§
Source§impl LiveStateResolver
impl LiveStateResolver
Sourcepub fn valid_status(&self, timestamp: &DateTime<Utc>) -> Option<&Status>
pub fn valid_status(&self, timestamp: &DateTime<Utc>) -> Option<&Status>
Returns the valid available status based on the given timestamp.
Sourcepub fn valid_module_info(
&self,
timestamp: &DateTime<Utc>,
) -> Option<&ModulesInfo>
pub fn valid_module_info( &self, timestamp: &DateTime<Utc>, ) -> Option<&ModulesInfo>
Returns the valid available module info based on the given timestamp.
Sourcepub fn valid_cargo(&self, timestamp: &DateTime<Utc>) -> Option<&Cargo>
pub fn valid_cargo(&self, timestamp: &DateTime<Utc>) -> Option<&Cargo>
Returns the valid available cargo based on the given timestamp.
Returns the valid available nav route based on the given timestamp.
Sourcepub fn valid_outfitting(&self, timestamp: &DateTime<Utc>) -> Option<&Outfitting>
pub fn valid_outfitting(&self, timestamp: &DateTime<Utc>) -> Option<&Outfitting>
Returns the valid available outfitting based on the given timestamp.
Sourcepub fn valid_shipyard(&self, timestamp: &DateTime<Utc>) -> Option<&Shipyard>
pub fn valid_shipyard(&self, timestamp: &DateTime<Utc>) -> Option<&Shipyard>
Returns the valid available shipyard based on the given timestamp.
Sourcepub fn valid_market(&self, timestamp: &DateTime<Utc>) -> Option<&Market>
pub fn valid_market(&self, timestamp: &DateTime<Utc>) -> Option<&Market>
Returns the valid available market based on the given timestamp.
Sourcepub fn valid_backpack(&self, timestamp: &DateTime<Utc>) -> Option<&Backpack>
pub fn valid_backpack(&self, timestamp: &DateTime<Utc>) -> Option<&Backpack>
Returns the valid available market based on the given timestamp.
Sourcepub fn valid_ship_locker(
&self,
timestamp: &DateTime<Utc>,
) -> Option<&ShipLocker>
pub fn valid_ship_locker( &self, timestamp: &DateTime<Utc>, ) -> Option<&ShipLocker>
Returns the valid available ship locker based on the given timestamp.
Sourcepub fn current_ship_status(&self) -> Option<&ShipStatus>
pub fn current_ship_status(&self) -> Option<&ShipStatus>
Returns the current available status about the player’s ship.
Sourcepub fn valid_ship_status(
&self,
timestamp: &DateTime<Utc>,
) -> Option<&ShipStatus>
pub fn valid_ship_status( &self, timestamp: &DateTime<Utc>, ) -> Option<&ShipStatus>
Returns the valid ship status based on the given timestamp.
Sourcepub fn current_planet_status(&self) -> Option<&PlanetStatus>
pub fn current_planet_status(&self) -> Option<&PlanetStatus>
Returns the current status information about the planet the player is currently close to.
Sourcepub fn valid_planet_status(
&self,
timestamp: &DateTime<Utc>,
) -> Option<&PlanetStatus>
pub fn valid_planet_status( &self, timestamp: &DateTime<Utc>, ) -> Option<&PlanetStatus>
Returns the valid planet status based on the given timestamp.