pub enum StatusKind {
Ship(ShipStatus),
OnFoot(OnFootStatus),
}
Expand description
The different sets of additional fields which are dependent on the current state of the player.
Variants§
Ship(ShipStatus)
Variant containing the fields for when the player is piloting a ship.
OnFoot(OnFootStatus)
Variant containing the fields for when the player is on-foot.
Implementations§
Source§impl StatusKind
impl StatusKind
Sourcepub fn is_ship_status(&self) -> bool
pub fn is_ship_status(&self) -> bool
Whether the current status kind is a ship status.
Sourcepub fn is_on_foot_status(&self) -> bool
pub fn is_on_foot_status(&self) -> bool
Whether the current status kind is an on-foot status.
Sourcepub fn ship_status(&self) -> Option<&ShipStatus>
pub fn ship_status(&self) -> Option<&ShipStatus>
Returns the ship status if it is set and returns None otherwise.
Sourcepub fn on_foot_status(&self) -> Option<&OnFootStatus>
pub fn on_foot_status(&self) -> Option<&OnFootStatus>
Returns the on-foot status if it is set and returns None otherwise.
Trait Implementations§
Source§impl Clone for StatusKind
impl Clone for StatusKind
Source§fn clone(&self) -> StatusKind
fn clone(&self) -> StatusKind
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 StatusKind
impl Debug for StatusKind
Source§impl<'de> Deserialize<'de> for StatusKind
impl<'de> Deserialize<'de> for StatusKind
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
Source§impl PartialEq for StatusKind
impl PartialEq for StatusKind
Source§impl Serialize for StatusKind
impl Serialize for StatusKind
impl StructuralPartialEq for StatusKind
Auto Trait Implementations§
impl Freeze for StatusKind
impl RefUnwindSafe for StatusKind
impl Send for StatusKind
impl Sync for StatusKind
impl Unpin for StatusKind
impl UnwindSafe for StatusKind
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