pub struct ClassificationAssignment {
pub system: Option<String>,
pub codes: Vec<Option<String>>,
}Expand description
One classification an object carries, directly or inherited from its type.
Fields§
§system: Option<String>Name of the classification system, or None when the source does not
connect this assignment to a system. A selector can then neither
confirm nor rule out a match, and the object is not evaluated.
codes: Vec<Option<String>>Codes from the assigned item up to the system root, leaf first. An
entry is None when that level states no code.
Implementations§
Source§impl ClassificationAssignment
impl ClassificationAssignment
Sourcepub fn matches(
&self,
system: &str,
code: &str,
include_descendants: bool,
) -> Option<bool>
pub fn matches( &self, system: &str, code: &str, include_descendants: bool, ) -> Option<bool>
Whether this assignment is code in system, or a descendant of it
when include_descendants is set. None when the system is unknown.
Sourcepub fn matches_code(
&self,
system: &str,
code: impl Fn(&str) -> bool,
include_descendants: bool,
) -> Option<bool>
pub fn matches_code( &self, system: &str, code: impl Fn(&str) -> bool, include_descendants: bool, ) -> Option<bool>
Whether this assignment is in system with a code code accepts,
or, when include_descendants is set, an ancestor’s code it accepts.
A level stating no code is never accepted. None when the system is
unknown.
Trait Implementations§
Source§impl Clone for ClassificationAssignment
impl Clone for ClassificationAssignment
Source§impl Debug for ClassificationAssignment
impl Debug for ClassificationAssignment
impl Eq for ClassificationAssignment
Source§impl PartialEq for ClassificationAssignment
impl PartialEq for ClassificationAssignment
impl StructuralPartialEq for ClassificationAssignment
Auto Trait Implementations§
impl Freeze for ClassificationAssignment
impl RefUnwindSafe for ClassificationAssignment
impl Send for ClassificationAssignment
impl Sync for ClassificationAssignment
impl Unpin for ClassificationAssignment
impl UnsafeUnpin for ClassificationAssignment
impl UnwindSafe for ClassificationAssignment
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