pub struct ClassificationMarking {
pub aliases: Vec<NameString>,
pub description: String,
pub name: NameString,
pub short_name: NameString,
pub require_lvl: Option<i32>,
pub is_required_group: bool,
pub is_hidden: bool,
}Expand description
A control or dissemination marking
Fields§
§aliases: Vec<NameString>List of alternate names for the current marking
description: StringLong form description of marking
name: NameStringLong form canonical name of marking
short_name: NameStringShort form canonical name of marking
require_lvl: Option<i32>The minimum classification level an item must have for this token to be valid. (optional)
is_required_group: boolThis is a token that is required but will display in the groups part of the classification string. (optional)
Should the marking be skipped building UI options
Implementations§
Source§impl ClassificationMarking
impl ClassificationMarking
Sourcepub fn new(short_name: &str, name: &str, aliases: Vec<&str>) -> Self
pub fn new(short_name: &str, name: &str, aliases: Vec<&str>) -> Self
Create a marking from canonical names and aliases
Sourcepub fn new_required(short_name: &str, name: &str) -> Self
pub fn new_required(short_name: &str, name: &str) -> Self
Create a marking from canonical names that is a required group
Sourcepub fn unique_names(&self) -> Vec<NameString>
pub fn unique_names(&self) -> Vec<NameString>
Get all of the unique names used by this item
Trait Implementations§
Source§impl Clone for ClassificationMarking
impl Clone for ClassificationMarking
Source§fn clone(&self) -> ClassificationMarking
fn clone(&self) -> ClassificationMarking
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClassificationMarking
impl Debug for ClassificationMarking
Source§impl<'de> Deserialize<'de> for ClassificationMarking
impl<'de> Deserialize<'de> for ClassificationMarking
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
Source§impl PartialEq for ClassificationMarking
impl PartialEq for ClassificationMarking
Source§impl Serialize for ClassificationMarking
impl Serialize for ClassificationMarking
impl StructuralPartialEq for ClassificationMarking
Auto Trait Implementations§
impl Freeze for ClassificationMarking
impl RefUnwindSafe for ClassificationMarking
impl Send for ClassificationMarking
impl Sync for ClassificationMarking
impl Unpin for ClassificationMarking
impl UnwindSafe for ClassificationMarking
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more