#[non_exhaustive]pub enum ClassKey {
Scalar {
ty: Type,
unit: Option<Unit>,
key_normalisation: Option<KeyNormalisation>,
},
Class(String),
}Expand description
The declaration of one class key (16.1).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scalar
{"type", ...}: a scalar key. The type is any of section 3 but blob; unit is present
exactly for a number, key_normalisation exactly for a string (and then it is
written even when it is none).
Fields
§
key_normalisation: Option<KeyNormalisation>The rule of a string key.
Class(String)
{"class": <full class name>}: a class-typed key, whose value is the key encoding of an
object of that class (16.5).
Trait Implementations§
impl Eq for ClassKey
impl StructuralPartialEq for ClassKey
Auto Trait Implementations§
impl Forget for ClassKey
impl Freeze for ClassKey
impl Move for ClassKey
impl RefUnwindSafe for ClassKey
impl Send for ClassKey
impl Sync for ClassKey
impl Unpin for ClassKey
impl UnsafeUnpin for ClassKey
impl UnwindSafe for ClassKey
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