pub struct LogicalAuthority {
pub identity_context: Option<BTreeMap<String, AuthorityValue>>,
pub execution: LogicalExecution,
}Expand description
The Logical Context of Authority: the application-facing JSON form
{ identity_context?, execution: { invariants, contract } }.
It is never embedded in a signed artifact directly.
super::indexed::IndexedAuthorityMap::from_logical produces the
canonical form that is signed inside the PIC PCA COSE; in that flattened
canonical representation, logical execution.contract maps to the
execution_contract section.
Fields§
§identity_context: Option<BTreeMap<String, AuthorityValue>>Descriptive or contextual identity data. Optional; it does not grant execution authority.
execution: LogicalExecutionExecutable authority and its execution constraints.
Implementations§
Source§impl LogicalAuthority
impl LogicalAuthority
Sourcepub fn new(
identity_context: Option<BTreeMap<String, AuthorityValue>>,
invariants: Vec<Invariant>,
contract: BTreeMap<String, AuthorityValue>,
) -> LogicalAuthority
pub fn new( identity_context: Option<BTreeMap<String, AuthorityValue>>, invariants: Vec<Invariant>, contract: BTreeMap<String, AuthorityValue>, ) -> LogicalAuthority
A Logical Context of Authority from its three parts.
Sourcepub fn validate(&self) -> Result<(), RejectReason>
pub fn validate(&self) -> Result<(), RejectReason>
Validates the Profile 0.2 logical input rules: the execution contract contains at least one attribute, and every value (identity and contract) is a non-empty string or a non-empty array of non-empty strings.
Trait Implementations§
Source§impl Clone for LogicalAuthority
impl Clone for LogicalAuthority
Source§fn clone(&self) -> LogicalAuthority
fn clone(&self) -> LogicalAuthority
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more