MCPcopy Create free account
hub / github.com/Lymia/enumset / EnumSetTypeWithRepr

Interface EnumSetTypeWithRepr

enumset/src/traits.rs:28–33  ·  view source on GitHub ↗

An [`EnumSetType`] for which [`EnumSet`]s have a guaranteed in-memory representation. An implementation of this trait is generated by using [`#[derive(EnumSetType)]`](derive@crate::EnumSetType) with the annotation `#[enumset(repr = "…")]`, where `…` is `u8`, `u16`, `u32`, `u64` or `u128`. For any type `T` that implements this trait, the in-memory representation of `EnumSet ` is guaranteed to b

Source from the content-addressed store, hash-verified

26///
27/// [`EnumSet`]: crate::set::EnumSet
28pub unsafe trait EnumSetTypeWithRepr:
29 EnumSetType + EnumSetTypePrivate<Repr = <Self as EnumSetTypeWithRepr>::Repr>
30{
31 /// The guaranteed representation.
32 type Repr: EnumSetTypeRepr;
33}
34
35/// The actual members of EnumSetType. Put here to avoid polluting global namespaces.
36pub unsafe trait EnumSetTypePrivate: EnumSetConstHelper + Sized {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected