pub struct GameStateResolver {
pub commanders: HashMap<String, GameCommanderEntry>,
/* private fields */
}
Expand description
High level state resolver which encapsulates LogState and in turn LogStateResolver. Like the LogStateResolver, this resolver handles all log events, but keep track of which commander the logs belong to.
Fields§
§commanders: HashMap<String, GameCommanderEntry>
A map of commanders that are tracked, where the key is the Frontier ID of the commander.
Implementations§
Source§impl GameStateResolver
impl GameStateResolver
Sourcepub fn current_commander(&self) -> Option<&GameCommanderEntry>
pub fn current_commander(&self) -> Option<&GameCommanderEntry>
Returns the current commander which is active in the logs.
Sourcepub fn current_commander_mut(&mut self) -> Option<&mut GameCommanderEntry>
pub fn current_commander_mut(&mut self) -> Option<&mut GameCommanderEntry>
Returns a mutable reference to the current active commander in the logs.
Trait Implementations§
Source§impl Default for GameStateResolver
impl Default for GameStateResolver
Source§fn default() -> GameStateResolver
fn default() -> GameStateResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GameStateResolver
impl RefUnwindSafe for GameStateResolver
impl Send for GameStateResolver
impl Sync for GameStateResolver
impl Unpin for GameStateResolver
impl UnwindSafe for GameStateResolver
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