CapabilitySemantics

Trait CapabilitySemantics 

Source
pub trait CapabilitySemantics<S, A>
where S: Scope, A: Ability,
{ // Provided methods fn parse_scope(&self, scope: &Url) -> Option<S> { ... } fn parse_action(&self, ability: &str) -> Option<A> { ... } fn extract_did(&self, path: &str) -> Option<(String, String)> { ... } fn parse_resource(&self, resource: &Url) -> Option<ResourceUri<S>> { ... } fn parse_caveat(&self, caveat: Option<&Value>) -> Value { ... } fn parse( &self, resource: &str, ability: &str, caveat: Option<&Value>, ) -> Option<CapabilityView<S, A>> { ... } fn parse_capability( &self, value: &Capability, ) -> Option<CapabilityView<S, A>> { ... } }

Provided Methods§

Source

fn parse_scope(&self, scope: &Url) -> Option<S>

Source

fn parse_action(&self, ability: &str) -> Option<A>

Source

fn extract_did(&self, path: &str) -> Option<(String, String)>

Source

fn parse_resource(&self, resource: &Url) -> Option<ResourceUri<S>>

Source

fn parse_caveat(&self, caveat: Option<&Value>) -> Value

Source

fn parse( &self, resource: &str, ability: &str, caveat: Option<&Value>, ) -> Option<CapabilityView<S, A>>

Parse a resource and abilities string and a caveats object. The default “no caveats” ([{}]) is implied if None caveats given.

Source

fn parse_capability(&self, value: &Capability) -> Option<CapabilityView<S, A>>

Implementors§