pub struct ProfileId(pub u16);Expand description
Index of a profile in Schema::profiles.
Tuple Fields§
§0: u16Implementations§
Source§impl ProfileId
impl ProfileId
Sourcepub const MAX_PROFILES: usize
pub const MAX_PROFILES: usize
How many profiles one schema may hold, which is ProfileMask’s width.
Sourcepub const fn mask(self) -> ProfileMask
pub const fn mask(self) -> ProfileMask
This profile as a single-bit mask.
§Panics
If the profile index is at or beyond ProfileId::MAX_PROFILES. The alternative is
worse and is what a bare shift gives: Rust masks an over-wide shift in release
builds, so profile 64 would silently alias profile 0 — every filtering decision in
the writer, the differ and the RDF export would then quietly attribute one profile’s
data to another. A schema this large is a generator defect rather than a caller’s
mistake, and schemas_fit_the_profile_mask in tests/schema.rs makes it a test
failure before it can ever be a panic.
Trait Implementations§
impl Copy for ProfileId
impl Eq for ProfileId
Source§impl Ord for ProfileId
impl Ord for ProfileId
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ProfileId
impl PartialOrd for ProfileId
impl StructuralPartialEq for ProfileId
Auto Trait Implementations§
impl Forget for ProfileId
impl Freeze for ProfileId
impl Move for ProfileId
impl RefUnwindSafe for ProfileId
impl Send for ProfileId
impl Sync for ProfileId
impl Unpin for ProfileId
impl UnsafeUnpin for ProfileId
impl UnwindSafe for ProfileId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.