#[repr(transparent)]pub struct COL_LAYER_CEnum(pub usize);
Expand description
Auto-generated FFI type for COL_LAYER
.
§When use this?
C’s enum is really just a number and there is no guarantee that it will fit within the enum. Therefore, it is used for the following cases that cannot be controlled by Rust.
- C++ members
- Function return values.
§When not to use it?
Mainly those that can be controlled for safety on the Rust side.
- Function Arguments
§Convenient methods
to_enum
/from_enum
: To inter-convert enums.count
: Returns the number of defined discriminants.
§Memory Layout
It will always have #[repr(transparent)]
.
In other words, it is equivalent to the size specified in repr
.
Tuple Fields§
§0: usize
Implementations§
Source§impl COL_LAYER_CEnum
impl COL_LAYER_CEnum
pub const Unidentified: Self
pub const Static: Self
pub const AnimStatic: Self
pub const Transparent: Self
pub const Clutter: Self
pub const Weapon: Self
pub const Projectile: Self
pub const Spell: Self
pub const Biped: Self
pub const Trees: Self
pub const Props: Self
pub const Water: Self
pub const Trigger: Self
pub const Terrain: Self
pub const Trap: Self
pub const NonCollidable: Self
pub const CloudTrap: Self
pub const Ground: Self
pub const Portal: Self
pub const DebrisSmall: Self
pub const DebrisLarge: Self
pub const AcousticSpace: Self
pub const ActorZone: Self
pub const ProjectileZone: Self
pub const GasTrap: Self
pub const ShellCasting: Self
pub const TransparentWall: Self
pub const InvisibleWall: Self
pub const TransparentSmallAnim: Self
pub const ClutterLarge: Self
pub const CharController: Self
pub const StairHelper: Self
pub const DeadBip: Self
pub const BipedNoCC: Self
pub const AvoidBox: Self
pub const CollisionBox: Self
pub const CameraSphere: Self
pub const DoorDetection: Self
pub const ConeProjectile: Self
pub const Camera: Self
pub const ItemPicker: Self
pub const LOS: Self
pub const PathingPick: Self
pub const Unused0: Self
pub const Unused1: Self
pub const SpellExplosion: Self
pub const DroppingPick: Self
Sourcepub const fn to_enum(self) -> Option<COL_LAYER>
pub const fn to_enum(self) -> Option<COL_LAYER>
Converts to the corresponding enum
variant.
Returns Some(COL_LAYER)
if the value is valid, otherwise None
.
Trait Implementations§
Source§impl Clone for COL_LAYER_CEnum
impl Clone for COL_LAYER_CEnum
Source§fn clone(&self) -> COL_LAYER_CEnum
fn clone(&self) -> COL_LAYER_CEnum
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 COL_LAYER_CEnum
impl Debug for COL_LAYER_CEnum
Source§impl Default for COL_LAYER_CEnum
impl Default for COL_LAYER_CEnum
Source§impl From<COL_LAYER> for COL_LAYER_CEnum
impl From<COL_LAYER> for COL_LAYER_CEnum
Source§impl Hash for COL_LAYER_CEnum
impl Hash for COL_LAYER_CEnum
Source§impl Ord for COL_LAYER_CEnum
impl Ord for COL_LAYER_CEnum
Source§fn cmp(&self, other: &COL_LAYER_CEnum) -> Ordering
fn cmp(&self, other: &COL_LAYER_CEnum) -> 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 COL_LAYER_CEnum
impl PartialEq for COL_LAYER_CEnum
Source§impl PartialOrd for COL_LAYER_CEnum
impl PartialOrd for COL_LAYER_CEnum
Source§impl TryFrom<COL_LAYER_CEnum> for COL_LAYER
impl TryFrom<COL_LAYER_CEnum> for COL_LAYER
impl Copy for COL_LAYER_CEnum
impl Eq for COL_LAYER_CEnum
impl StructuralPartialEq for COL_LAYER_CEnum
Auto Trait Implementations§
impl Freeze for COL_LAYER_CEnum
impl RefUnwindSafe for COL_LAYER_CEnum
impl Send for COL_LAYER_CEnum
impl Sync for COL_LAYER_CEnum
impl Unpin for COL_LAYER_CEnum
impl UnwindSafe for COL_LAYER_CEnum
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