pub struct Rubric(/* private fields */);Expand description
A rubric is a map of string keys to structured JSON-shaped values.
The map is ordered (BTreeMap) to keep serialization stable and
simplify equality for tests.
Implementations§
Source§impl Rubric
impl Rubric
pub fn new(entries: BTreeMap<String, Value>) -> Result<Self, DomainError>
pub fn empty() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, key: &str) -> Option<&Value>
pub fn as_map(&self) -> &BTreeMap<String, Value>
pub fn into_inner(self) -> BTreeMap<String, Value>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rubric
impl<'de> Deserialize<'de> for Rubric
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
impl Eq for Rubric
impl StructuralPartialEq for Rubric
Auto Trait Implementations§
impl Freeze for Rubric
impl RefUnwindSafe for Rubric
impl Send for Rubric
impl Sync for Rubric
impl Unpin for Rubric
impl UnsafeUnpin for Rubric
impl UnwindSafe for Rubric
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