pub struct SecurityState {
pub device: String,
pub provider: String,
pub scope: String,
pub guarantees: Vec<String>,
pub authenticated_principal: Option<String>,
pub note: String,
}Expand description
state/modem/device/{device}/security — properties, never a boolean.
Invariant I6, demonstrated rather than described. A device that provides
no link security reports an empty guarantee set rather than omitting the
subject or publishing a bare encrypted: false, which would say nothing
about mode, scope, key management or peer authentication. A device, or a
layer above it, that does provide something reports it through
modem_device::Device::security, and this document carries exactly
that: what the device and its layers guarantee, hop by hop.
Note there is no encrypted field and cannot be one: serde emits what the
type has. That is I6 enforced where it is enforceable, which is why the
served schema does not additionally need to forbid it.
Fields§
§device: StringThe local device.
provider: StringWho provides link security, if anyone.
scope: StringWhat it covers.
guarantees: Vec<String>The properties it guarantees, named individually.
authenticated_principal: Option<String>The principal the far side authenticated as, if any.
Explicitly null rather than absent: I6 is about naming what is not guaranteed, and omitting the field would be silence.
note: StringWhy the above reads as it does.
Implementations§
Source§impl SecurityState
impl SecurityState
Sourcepub fn of(device: &str, props: Option<&SecurityProperties>) -> SecurityState
pub fn of(device: &str, props: Option<&SecurityProperties>) -> SecurityState
What the device reports (Some), or the statement that it reports
nothing (None): no link cryptography, said as properties.
Trait Implementations§
Source§impl Clone for SecurityState
impl Clone for SecurityState
Source§fn clone(&self) -> SecurityState
fn clone(&self) -> SecurityState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecurityState
impl Debug for SecurityState
Source§impl<'de> Deserialize<'de> for SecurityState
impl<'de> Deserialize<'de> for SecurityState
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecurityState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecurityState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SecurityState
Source§impl JsonSchema for SecurityState
impl JsonSchema for SecurityState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SecurityState
impl PartialEq for SecurityState
Source§impl Serialize for SecurityState
impl Serialize for SecurityState
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SecurityState
Auto Trait Implementations§
impl Freeze for SecurityState
impl RefUnwindSafe for SecurityState
impl Send for SecurityState
impl Sync for SecurityState
impl Unpin for SecurityState
impl UnsafeUnpin for SecurityState
impl UnwindSafe for SecurityState
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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