pub struct Include {
nsid: String,
aud: Option<String>,
}Expand description
An include: scope, read: the permission set it names, and the audience
that set’s rpc permissions may inherit.
Fields§
§nsid: String§aud: Option<String>Implementations§
Source§impl Include
impl Include
Sourcepub fn new(nsid: &str, aud: Option<&str>) -> Result<Self, IncludeError>
pub fn new(nsid: &str, aud: Option<&str>) -> Result<Self, IncludeError>
The set an include: scope names, and the audience it passes on,
both percent-decoded as Scope::Include holds them.
nsid must be an NSID, and aud must name one service:
did:web:api.example.com#svc_appview. * is refused.
Sourcepub fn aud(&self) -> Option<&str>
pub fn aud(&self) -> Option<&str>
The audience the set’s inheritAud permissions take, percent-decoded.
Sourcepub fn grants(&self, permissions: &[Value]) -> Vec<Scope>
pub fn grants(&self, permissions: &[Value]) -> Vec<Scope>
The atoms a set’s published permissions grant through this
include:: one per collection and one per method.
Sourcefn grant(&self, permission: &Map<String, Value>) -> Option<Vec<Scope>>
fn grant(&self, permission: &Map<String, Value>) -> Option<Vec<Scope>>
One permission’s atoms, or None for a permission this ignores.
fn repo(&self, permission: &Map<String, Value>) -> Option<Vec<Scope>>
fn rpc(&self, permission: &Map<String, Value>) -> Option<Vec<Scope>>
Sourcefn nsids(&self, list: &Value, unique: bool) -> Option<BTreeSet<String>>
fn nsids(&self, list: &Value, unique: bool) -> Option<BTreeSet<String>>
A non-empty list of NSIDs under this set’s group, or None if any
entry is not one. unique refuses a list that names one twice.
Whether nsid sits under this set’s group: the set’s own NSID less
its name. The group’s parent and its siblings are outside it.
Trait Implementations§
impl Eq for Include
impl StructuralPartialEq for Include
Auto Trait Implementations§
impl Freeze for Include
impl RefUnwindSafe for Include
impl Send for Include
impl Sync for Include
impl Unpin for Include
impl UnsafeUnpin for Include
impl UnwindSafe for Include
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.