Struct EnumerationValuesStorage
#[repr(C)]pub struct EnumerationValuesStorage<E, const S: usize>(/* private fields */)
where
E: EnumerationValue<E>;Expand description
Storage of enumeration values terminated by a zero value. Should be used
only as a storage location for EnumValue or FlagsValue when registering
an enum or flags as a dynamic type.
see TypePluginRegisterImpl::register_dynamic_enum(), TypePluginRegisterImpl::register_dynamic_flags()
and TypePluginImpl::complete_type_info().
Inner is intentionally private to ensure other modules will not access the
enum (or flags) values by this way.
Use EnumClass::values() or EnumClass::value() to get the enum values.
Use FlagsClass::values() or FlagsClass::value() to get the flags values.
Implementations§
§impl<E, const S: usize> EnumerationValuesStorage<E, S>where
E: EnumerationValue<E>,
impl<E, const S: usize> EnumerationValuesStorage<E, S>where
E: EnumerationValue<E>,
pub const fn new<const N: usize>(
values: [E; N],
) -> EnumerationValuesStorage<E, S>
pub const fn new<const N: usize>( values: [E; N], ) -> EnumerationValuesStorage<E, S>
creates a new EnumerationValuesStorage with the given values and a final zero value.
Trait Implementations§
§impl<E, const S: usize> AsRef<EnumerationValues<E>> for EnumerationValuesStorage<E, S>where
E: EnumerationValue<E>,
impl<E, const S: usize> AsRef<EnumerationValues<E>> for EnumerationValuesStorage<E, S>where
E: EnumerationValue<E>,
§fn as_ref(&self) -> &EnumerationValues<E>
fn as_ref(&self) -> &EnumerationValues<E>
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl<E, const S: usize> Freeze for EnumerationValuesStorage<E, S>where
E: Freeze,
impl<E, const S: usize> RefUnwindSafe for EnumerationValuesStorage<E, S>where
E: RefUnwindSafe,
impl<E, const S: usize> Send for EnumerationValuesStorage<E, S>where
E: Send,
impl<E, const S: usize> Sync for EnumerationValuesStorage<E, S>where
E: Sync,
impl<E, const S: usize> Unpin for EnumerationValuesStorage<E, S>where
E: Unpin,
impl<E, const S: usize> UnwindSafe for EnumerationValuesStorage<E, S>where
E: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more