pub enum LevelSpec {
Count(u32),
Labels(Vec<String>),
}Expand description
A rubric given either as a plain count or as the text of each level.
Variants§
Count(u32)
"levels": 5 — the engine generates the legend (“1” through “5”).
Wider than the range it may hold, so "levels": 300 reaches validation and is refused as
invalid_levels naming the bounds, rather than failing to match either variant of this
untagged enum with a message that names neither.
Labels(Vec<String>)
"levels": ["gar nicht", "wenig", ...] — the strings become the legend.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LevelSpec
impl<'de> Deserialize<'de> for LevelSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LevelSpec
impl RefUnwindSafe for LevelSpec
impl Send for LevelSpec
impl Sync for LevelSpec
impl Unpin for LevelSpec
impl UnsafeUnpin for LevelSpec
impl UnwindSafe for LevelSpec
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