Struct FormType_CEnum

Source
#[repr(transparent)]
pub struct FormType_CEnum(pub u8);
Expand description

Auto-generated FFI type for FormType.

§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: u8

Implementations§

Source§

impl FormType_CEnum

Source

pub const None: Self

Source

pub const PluginInfo: Self

Source

pub const FormGroup: Self

Source

pub const GameSetting: Self

Source

pub const Keyword: Self

Source

pub const LocationRefType: Self

Source

pub const Action: Self

Source

pub const TextureSet: Self

Source

pub const MenuIcon: Self

Source

pub const Global: Self

Source

pub const Class: Self

Source

pub const Faction: Self

Source

pub const HeadPart: Self

Source

pub const Eyes: Self

Source

pub const Race: Self

Source

pub const Sound: Self

Source

pub const AcousticSpace: Self

Source

pub const Skill: Self

Source

pub const MagicEffect: Self

Source

pub const Script: Self

Source

pub const LandTexture: Self

Source

pub const Enchantment: Self

Source

pub const Spell: Self

Source

pub const Scroll: Self

Source

pub const Activator: Self

Source

pub const TalkingActivator: Self

Source

pub const Armor: Self

Source

pub const Book: Self

Source

pub const Container: Self

Source

pub const Door: Self

Source

pub const Ingredient: Self

Source

pub const Light: Self

Source

pub const Misc: Self

Source

pub const Apparatus: Self

Source

pub const Static: Self

Source

pub const StaticCollection: Self

Source

pub const MovableStatic: Self

Source

pub const Grass: Self

Source

pub const Tree: Self

Source

pub const Flora: Self

Source

pub const Furniture: Self

Source

pub const Weapon: Self

Source

pub const Ammo: Self

Source

pub const NPC: Self

Source

pub const LeveledNPC: Self

Source

pub const KeyMaster: Self

Source

pub const AlchemyItem: Self

Source

pub const IdleMarker: Self

Source

pub const Note: Self

Source

pub const ConstructibleObject: Self

Source

pub const Projectile: Self

Source

pub const Hazard: Self

Source

pub const SoulGem: Self

Source

pub const LeveledItem: Self

Source

pub const Weather: Self

Source

pub const Climate: Self

Source

pub const ShaderParticleGeometryData: Self

Source

pub const ReferenceEffect: Self

Source

pub const Region: Self

Source

pub const Navigation: Self

Source

pub const Cell: Self

Source

pub const Reference: Self

Source

pub const ActorCharacter: Self

Source

pub const ProjectileMissile: Self

Source

pub const ProjectileArrow: Self

Source

pub const ProjectileGrenade: Self

Source

pub const ProjectileBeam: Self

Source

pub const ProjectileFlame: Self

Source

pub const ProjectileCone: Self

Source

pub const ProjectileBarrier: Self

Source

pub const PlacedHazard: Self

Source

pub const WorldSpace: Self

Source

pub const Land: Self

Source

pub const NavMesh: Self

Source

pub const TLOD: Self

Source

pub const Dialogue: Self

Source

pub const Info: Self

Source

pub const Quest: Self

Source

pub const Idle: Self

Source

pub const Package: Self

Source

pub const CombatStyle: Self

Source

pub const LoadScreen: Self

Source

pub const LeveledSpell: Self

Source

pub const AnimatedObject: Self

Source

pub const Water: Self

Source

pub const EffectShader: Self

Source

pub const TOFT: Self

Source

pub const Explosion: Self

Source

pub const Debris: Self

Source

pub const ImageSpace: Self

Source

pub const ImageAdapter: Self

Source

pub const FormList: Self

Source

pub const Perk: Self

Source

pub const BodyPartData: Self

Source

pub const AddonNode: Self

Source

pub const ActorValueInfo: Self

Source

pub const CameraShot: Self

Source

pub const CameraPath: Self

Source

pub const VoiceType: Self

Source

pub const MaterialType: Self

Source

pub const Impact: Self

Source

pub const ImpactDataSet: Self

Source

pub const Armature: Self

Source

pub const EncounterZone: Self

Source

pub const Location: Self

Source

pub const Message: Self

Source

pub const Ragdoll: Self

Source

pub const DefaultObject: Self

Source

pub const LightingMaster: Self

Source

pub const MusicType: Self

Source

pub const Footstep: Self

Source

pub const FootstepSet: Self

Source

pub const StoryManagerBranchNode: Self

Source

pub const StoryManagerQuestNode: Self

Source

pub const StoryManagerEventNode: Self

Source

pub const DialogueBranch: Self

Source

pub const MusicTrack: Self

Source

pub const DialogueView: Self

Source

pub const WordOfPower: Self

Source

pub const Shout: Self

Source

pub const EquipSlot: Self

Source

pub const Relationship: Self

Source

pub const Scene: Self

Source

pub const AssociationType: Self

Source

pub const Outfit: Self

Source

pub const ArtObject: Self

Source

pub const MaterialObject: Self

Source

pub const MovementType: Self

Source

pub const SoundRecord: Self

Source

pub const DualCastData: Self

Source

pub const SoundCategory: Self

Source

pub const SoundOutputModel: Self

Source

pub const CollisionLayer: Self

Source

pub const ColorForm: Self

Source

pub const ReverbParam: Self

Source

pub const LensFlare: Self

Source

pub const LensSprite: Self

Source

pub const VolumetricLighting: Self

Source

pub const Max: Self

Source

pub const fn to_enum(self) -> Option<FormType>

Converts to the corresponding enum variant.

Returns Some(FormType) if the value is valid, otherwise None.

Source

pub const fn from_enum(e: FormType) -> Self

Creates the struct from the enum.

This allows for easy conversion back to the FFI-friendly representation.

Source

pub const fn count() -> usize

Number of discriminant in enum.

Returns 139

Trait Implementations§

Source§

impl Clone for FormType_CEnum

Source§

fn clone(&self) -> FormType_CEnum

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FormType_CEnum

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FormType_CEnum

Source§

fn default() -> Self

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

impl From<FormType> for FormType_CEnum

Source§

fn from(value: FormType) -> Self

Converts to this type from the input type.
Source§

impl Hash for FormType_CEnum

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for FormType_CEnum

Source§

fn cmp(&self, other: &FormType_CEnum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for FormType_CEnum

Source§

fn eq(&self, other: &FormType_CEnum) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for FormType_CEnum

Source§

fn partial_cmp(&self, other: &FormType_CEnum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<FormType_CEnum> for FormType

Source§

type Error = &'static str

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

fn try_from(value: FormType_CEnum) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for FormType_CEnum

Source§

impl Eq for FormType_CEnum

Source§

impl StructuralPartialEq for FormType_CEnum

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more