#[repr(i32)]pub enum CarefulMovementType {
Show 13 variants
DefaultMovement = 0,
ReleaseItemHold = 1,
ReleaseTileHold = 2,
AttackCreature = 3,
HoldTile = 4,
Move = 5,
Climb = 6,
HoldItem = 7,
BuildingInteract = 8,
ItemInteract = 9,
ItemInteractGuide = 10,
ItemInteractRide = 11,
ItemInteractPush = 12,
}Variants§
DefaultMovement = 0
ReleaseItemHold = 1
ReleaseTileHold = 2
AttackCreature = 3
HoldTile = 4
Move = 5
Climb = 6
HoldItem = 7
BuildingInteract = 8
ItemInteract = 9
ItemInteractGuide = 10
ItemInteractRide = 11
ItemInteractPush = 12
Implementations§
Source§impl CarefulMovementType
impl CarefulMovementType
Sourcepub fn from_i32(value: i32) -> Option<CarefulMovementType>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<CarefulMovementType>
Use the TryFrom<i32> implementation instead
Converts an i32 to a CarefulMovementType, or None if value is not a valid variant.
Source§impl CarefulMovementType
impl CarefulMovementType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for CarefulMovementType
impl Clone for CarefulMovementType
Source§fn clone(&self) -> CarefulMovementType
fn clone(&self) -> CarefulMovementType
Returns a duplicate 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 CarefulMovementType
impl Debug for CarefulMovementType
Source§impl Default for CarefulMovementType
impl Default for CarefulMovementType
Source§fn default() -> CarefulMovementType
fn default() -> CarefulMovementType
Returns the “default value” for a type. Read more
Source§impl From<CarefulMovementType> for i32
impl From<CarefulMovementType> for i32
Source§fn from(value: CarefulMovementType) -> i32
fn from(value: CarefulMovementType) -> i32
Converts to this type from the input type.
Source§impl Hash for CarefulMovementType
impl Hash for CarefulMovementType
Source§impl Ord for CarefulMovementType
impl Ord for CarefulMovementType
Source§fn cmp(&self, other: &CarefulMovementType) -> Ordering
fn cmp(&self, other: &CarefulMovementType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CarefulMovementType
impl PartialEq for CarefulMovementType
Source§impl PartialOrd for CarefulMovementType
impl PartialOrd for CarefulMovementType
Source§impl Serialize for CarefulMovementType
impl Serialize for CarefulMovementType
Source§impl TryFrom<i32> for CarefulMovementType
impl TryFrom<i32> for CarefulMovementType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<CarefulMovementType, UnknownEnumValue>
fn try_from(value: i32) -> Result<CarefulMovementType, UnknownEnumValue>
Performs the conversion.
impl Copy for CarefulMovementType
impl Eq for CarefulMovementType
impl StructuralPartialEq for CarefulMovementType
Auto Trait Implementations§
impl Freeze for CarefulMovementType
impl RefUnwindSafe for CarefulMovementType
impl Send for CarefulMovementType
impl Sync for CarefulMovementType
impl Unpin for CarefulMovementType
impl UnsafeUnpin for CarefulMovementType
impl UnwindSafe for CarefulMovementType
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