pub struct Capability {Show 13 fields
pub id: Id,
pub actor: Id,
pub operation: CapabilityOperation,
pub target_type: String,
pub target_refs: Vec<ObjectRef>,
pub contexts: Vec<Id>,
pub preconditions: Vec<Id>,
pub postconditions: Vec<Id>,
pub forbidden_effects: Vec<Description>,
pub required_review: Option<RequiredReview>,
pub validity_interval: Option<ValidityInterval>,
pub provenance: Provenance,
pub status: CapabilityStatus,
}Expand description
Actor-specific ability to operate on a target in a context.
Fields§
§id: IdCapability identifier.
actor: IdActor cell.
operation: CapabilityOperationOperation granted.
target_type: StringTarget type.
target_refs: Vec<ObjectRef>Target references.
contexts: Vec<Id>Valid contexts.
preconditions: Vec<Id>Preconditions.
postconditions: Vec<Id>Postconditions.
forbidden_effects: Vec<Description>Forbidden effects.
required_review: Option<RequiredReview>Required review.
validity_interval: Option<ValidityInterval>Validity interval.
provenance: ProvenanceCapability provenance.
status: CapabilityStatusCapability status.
Implementations§
Source§impl Capability
impl Capability
Sourcepub fn validate_active_use(&self) -> Result<()>
pub fn validate_active_use(&self) -> Result<()>
Validates whether this capability may be used for a mutating operation.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
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 Capability
impl Debug for Capability
Source§impl<'de> Deserialize<'de> for Capability
impl<'de> Deserialize<'de> for Capability
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 Capability
impl PartialEq for Capability
Source§fn eq(&self, other: &Capability) -> bool
fn eq(&self, other: &Capability) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Capability
impl Serialize for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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