#[repr(transparent)]pub struct QuestType_CEnum(pub u8);
Expand description
Auto-generated FFI type for QuestType
.
§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 QuestType_CEnum
impl QuestType_CEnum
pub const None: Self
pub const MainQuest: Self
pub const MagesGuild: Self
pub const ThievesGuild: Self
pub const DarkBrotherhood: Self
pub const CompanionsQuest: Self
pub const Miscellaneous: Self
pub const Daedric: Self
pub const SideQuest: Self
pub const CivilWar: Self
pub const DLC01Vampire: Self
pub const DLC02Dragonborn: Self
Sourcepub const fn to_enum(self) -> Option<QuestType>
pub const fn to_enum(self) -> Option<QuestType>
Converts to the corresponding enum
variant.
Returns Some(QuestType)
if the value is valid, otherwise None
.
Trait Implementations§
Source§impl Clone for QuestType_CEnum
impl Clone for QuestType_CEnum
Source§fn clone(&self) -> QuestType_CEnum
fn clone(&self) -> QuestType_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 QuestType_CEnum
impl Debug for QuestType_CEnum
Source§impl Default for QuestType_CEnum
impl Default for QuestType_CEnum
Source§impl From<QuestType> for QuestType_CEnum
impl From<QuestType> for QuestType_CEnum
Source§impl Hash for QuestType_CEnum
impl Hash for QuestType_CEnum
Source§impl Ord for QuestType_CEnum
impl Ord for QuestType_CEnum
Source§fn cmp(&self, other: &QuestType_CEnum) -> Ordering
fn cmp(&self, other: &QuestType_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 QuestType_CEnum
impl PartialEq for QuestType_CEnum
Source§impl PartialOrd for QuestType_CEnum
impl PartialOrd for QuestType_CEnum
Source§impl TryFrom<QuestType_CEnum> for QuestType
impl TryFrom<QuestType_CEnum> for QuestType
impl Copy for QuestType_CEnum
impl Eq for QuestType_CEnum
impl StructuralPartialEq for QuestType_CEnum
Auto Trait Implementations§
impl Freeze for QuestType_CEnum
impl RefUnwindSafe for QuestType_CEnum
impl Send for QuestType_CEnum
impl Sync for QuestType_CEnum
impl Unpin for QuestType_CEnum
impl UnwindSafe for QuestType_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