pub struct SecurityLabel(/* private fields */);Expand description
An opaque, bounded label interpreted only by an explicit policy engine.
Labels are case-sensitive and are never trimmed, normalized, ranked, or
treated as an authorization grant by stateknot-core.
Implementations§
Source§impl SecurityLabel
impl SecurityLabel
Sourcepub fn new(value: impl Into<String>) -> Result<Self, SecurityLabelError>
pub fn new(value: impl Into<String>) -> Result<Self, SecurityLabelError>
Validates and constructs an opaque security label.
§Errors
Returns SecurityLabelError when the value is empty, too long, does
not start with an ASCII alphanumeric byte, or contains a byte outside
the stable ASCII grammar.
Trait Implementations§
Source§impl AsRef<str> for SecurityLabel
impl AsRef<str> for SecurityLabel
Source§impl Borrow<str> for SecurityLabel
impl Borrow<str> for SecurityLabel
Source§impl Clone for SecurityLabel
impl Clone for SecurityLabel
Source§impl Debug for SecurityLabel
impl Debug for SecurityLabel
Source§impl<'de> Deserialize<'de> for SecurityLabel
impl<'de> Deserialize<'de> for SecurityLabel
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 Display for SecurityLabel
impl Display for SecurityLabel
impl Eq for SecurityLabel
Source§impl From<SecurityLabel> for String
impl From<SecurityLabel> for String
Source§fn from(value: SecurityLabel) -> Self
fn from(value: SecurityLabel) -> Self
Converts to this type from the input type.
Source§impl FromStr for SecurityLabel
impl FromStr for SecurityLabel
Source§impl Hash for SecurityLabel
impl Hash for SecurityLabel
Source§impl JsonSchema for SecurityLabel
impl JsonSchema for SecurityLabel
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for SecurityLabel
impl Ord for SecurityLabel
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SecurityLabel
impl PartialEq for SecurityLabel
Source§impl PartialOrd for SecurityLabel
impl PartialOrd for SecurityLabel
Source§impl Serialize for SecurityLabel
impl Serialize for SecurityLabel
impl StructuralPartialEq for SecurityLabel
Source§impl TryFrom<&str> for SecurityLabel
impl TryFrom<&str> for SecurityLabel
Auto Trait Implementations§
impl Forget for SecurityLabel
impl Freeze for SecurityLabel
impl Move for SecurityLabel
impl RefUnwindSafe for SecurityLabel
impl Send for SecurityLabel
impl Sync for SecurityLabel
impl Unpin for SecurityLabel
impl UnsafeUnpin for SecurityLabel
impl UnwindSafe for SecurityLabel
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