pub trait CapabilitySemantics<S, A>{
// 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§
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
Sourcefn parse(
&self,
resource: &str,
ability: &str,
caveat: Option<&Value>,
) -> Option<CapabilityView<S, A>>
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.