pub struct OriginAuthorityLabelV1 {Show 18 fields
pub schema_version: String,
pub origin_class: OriginClassV1,
pub origin_principal: String,
pub origin_channel: String,
pub origin_digest: String,
pub risk: OriginRiskV1,
pub scopes: AuthorityScopesV1,
pub elevation: ElevationRequirementV1,
pub revocation_reference: Option<String>,
pub revocation_status: RevocationStatusV1,
pub audience: Vec<String>,
pub ancestor_digests: Vec<String>,
pub derivation_kind: Option<OriginDerivationKindV1>,
pub subject_principal: Option<SubjectPrincipalV1>,
pub audience_at_write: AudienceV1,
pub resource_scope: NamespaceScopeV1,
pub policy_version: String,
pub policy_digest: String,
}Expand description
Immutable label fixed at the canonical write boundary.
Fields§
§schema_version: String§origin_class: OriginClassV1§origin_principal: String§origin_channel: String§origin_digest: String§risk: OriginRiskV1§scopes: AuthorityScopesV1§elevation: ElevationRequirementV1§revocation_reference: Option<String>§revocation_status: RevocationStatusV1§audience: Vec<String>§ancestor_digests: Vec<String>§derivation_kind: Option<OriginDerivationKindV1>§subject_principal: Option<SubjectPrincipalV1>Principal the assertion is about. Kept separate from the write principal so a caller cannot substitute a subject merely by presenting an otherwise valid audience.
audience_at_write: AudienceV1Audience captured at write time. audience above remains for decoding V1 records.
resource_scope: NamespaceScopeV1Immutable resource scope captured at the canonical write boundary.
policy_version: String§policy_digest: StringImplementations§
Source§impl OriginAuthorityLabelV1
impl OriginAuthorityLabelV1
pub fn new( origin_class: OriginClassV1, origin_principal: impl Into<String>, origin_channel: impl Into<String>, origin_digest: impl Into<String>, risk: OriginRiskV1, scopes: AuthorityScopesV1, elevation: ElevationRequirementV1, revocation_reference: Option<String>, revocation_status: RevocationStatusV1, audience: Vec<String>, ) -> Result<Self, String>
pub fn with_subject_principal(self, subject: SubjectPrincipalV1) -> Self
pub fn with_resource_scope(self, scope: NamespaceScopeV1) -> Self
Sourcepub fn derive(
ancestors: &[Self],
kind: OriginDerivationKindV1,
derived_content_digest: impl Into<String>,
) -> Result<Self, String>
pub fn derive( ancestors: &[Self], kind: OriginDerivationKindV1, derived_content_digest: impl Into<String>, ) -> Result<Self, String>
Deterministically derive a label using maximum ancestor risk and minimum authority.
pub fn operator_system(principal: &str, channel: &str) -> Self
Trait Implementations§
Source§impl Clone for OriginAuthorityLabelV1
impl Clone for OriginAuthorityLabelV1
Source§fn clone(&self) -> OriginAuthorityLabelV1
fn clone(&self) -> OriginAuthorityLabelV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OriginAuthorityLabelV1
impl Debug for OriginAuthorityLabelV1
Source§impl<'de> Deserialize<'de> for OriginAuthorityLabelV1
impl<'de> Deserialize<'de> for OriginAuthorityLabelV1
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 OriginAuthorityLabelV1
Source§impl PartialEq for OriginAuthorityLabelV1
impl PartialEq for OriginAuthorityLabelV1
Source§impl Serialize for OriginAuthorityLabelV1
impl Serialize for OriginAuthorityLabelV1
impl StructuralPartialEq for OriginAuthorityLabelV1
Auto Trait Implementations§
impl Freeze for OriginAuthorityLabelV1
impl RefUnwindSafe for OriginAuthorityLabelV1
impl Send for OriginAuthorityLabelV1
impl Sync for OriginAuthorityLabelV1
impl Unpin for OriginAuthorityLabelV1
impl UnsafeUnpin for OriginAuthorityLabelV1
impl UnwindSafe for OriginAuthorityLabelV1
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,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.