Struct glib::enums::EnumerationValuesStorage
source · #[repr(C)]pub struct EnumerationValuesStorage<E: EnumerationValue<E>, const S: usize>(/* private fields */);
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§
source§impl<E: EnumerationValue<E>, const S: usize> EnumerationValuesStorage<E, S>
impl<E: EnumerationValue<E>, const S: usize> EnumerationValuesStorage<E, S>
Trait Implementations§
source§impl<E: EnumerationValue<E>, const S: usize> AsRef<EnumerationValues<E>> for EnumerationValuesStorage<E, S>
impl<E: EnumerationValue<E>, const S: usize> AsRef<EnumerationValues<E>> for EnumerationValuesStorage<E, S>
source§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