Struct LogStateResolver

Source
pub struct LogStateResolver {
    pub systems: HashMap<u64, SystemState>,
    pub current_system: Option<u64>,
    pub current_organic_progress: Option<CurrentOrganicProgress>,
    pub current_exploration_data: Vec<ScanEvent>,
    pub material_state: MaterialsState,
    pub shipyard_state: ShipyardState,
    pub touchdown: Option<TouchdownEvent>,
    pub carrier_state: Option<CarrierState>,
    pub current_loadout: Option<LoadoutEvent>,
    pub rank: Option<RankEvent>,
    pub reputation: Option<ReputationEvent>,
    pub statistics: Option<StatisticsEvent>,
}
Expand description

High level resolver for resolving all log events. This does not however differentiate between multiple commanders, whereas GameStateResolver does.

Fields§

§systems: HashMap<u64, SystemState>

Systems that the player has visited.

§current_system: Option<u64>

The system address the player is currently in.

§current_organic_progress: Option<CurrentOrganicProgress>

Information about the current exobiology scans the player is performing.

§current_exploration_data: Vec<ScanEvent>

List of scans that have been performed since the last time the player has sold data or died.

§material_state: MaterialsState

Keeps track of the current materials the player has.

§shipyard_state: ShipyardState

Information about the player’s stored ships.

§touchdown: Option<TouchdownEvent>

Current touchdown event. Is set back to none when the player lifts off or dies.

§carrier_state: Option<CarrierState>

State regarding the player’s carrier if they own one. None means that the player does not own one or that their carrier has been scrapped.

§current_loadout: Option<LoadoutEvent>

The lastest loadout event fired for the player.

§rank: Option<RankEvent>

The lastest rank event fired for the player.

§reputation: Option<ReputationEvent>

The lastest reputation event fired for the player.

§statistics: Option<StatisticsEvent>

The lastest statistics event fired for the player.

Implementations§

Source§

impl LogStateResolver

Source

pub fn upsert_system( &mut self, location_info: &LocationInfo, ) -> &mut SystemState

Source

pub fn current_system(&self) -> Option<&SystemState>

Source

pub fn system_by_address(&self, address: u64) -> Option<&SystemState>

Source

pub fn current_exploration_worth(&self) -> u64

Trait Implementations§

Source§

impl Default for LogStateResolver

Source§

fn default() -> LogStateResolver

Returns the “default value” for a type. Read more
Source§

impl Serialize for LogStateResolver

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.