pub struct MoqCapability {
pub root: String,
pub publish: Prefixes,
pub subscribe: Prefixes,
}Expand description
What a holder may do at a moq node: publish and subscribe under a root.
The prefixes are relative to root, as in a moq-auth JWT,
and each covers its path and every path beneath it. One capability permits
another when its paths cover the other’s.
On the wire each prefix is spelled as the subtree pattern it covers,
foo/** or **, which verifiers from before prefixes read the same way.
A chain from such a verifier’s era whose members are literal paths, such
as bob/cam or "", does not verify: rcan checks a link’s signature over
the capability written again, and a literal is now written as its
subtree. Such a chain must be issued again.
Fields§
§root: StringThe path the prefixes are relative to.
publish: PrefixesThe paths the holder may publish, relative to the root.
subscribe: PrefixesThe paths the holder may subscribe to, relative to the root.
Implementations§
Source§impl MoqCapability
impl MoqCapability
Sourcepub fn new(root: impl Into<String>) -> Self
pub fn new(root: impl Into<String>) -> Self
Returns a capability under root that grants nothing yet.
Sourcepub fn with_publish(self, publish: impl Into<Prefixes>) -> Self
pub fn with_publish(self, publish: impl Into<Prefixes>) -> Self
Returns this capability with publish as the paths the holder may publish.
Sourcepub fn with_subscribe(self, subscribe: impl Into<Prefixes>) -> Self
pub fn with_subscribe(self, subscribe: impl Into<Prefixes>) -> Self
Returns this capability with subscribe as the paths the holder may subscribe to.
Trait Implementations§
Source§impl Capability for MoqCapability
impl Capability for MoqCapability
Source§impl Clone for MoqCapability
impl Clone for MoqCapability
Source§impl Debug for MoqCapability
impl Debug for MoqCapability
Source§impl<'de> Deserialize<'de> for MoqCapability
impl<'de> Deserialize<'de> for MoqCapability
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>,
impl Eq for MoqCapability
Source§impl PartialEq for MoqCapability
impl PartialEq for MoqCapability
Source§impl Serialize for MoqCapability
impl Serialize for MoqCapability
impl StructuralPartialEq for MoqCapability
Auto Trait Implementations§
impl Freeze for MoqCapability
impl RefUnwindSafe for MoqCapability
impl Send for MoqCapability
impl Sync for MoqCapability
impl Unpin for MoqCapability
impl UnsafeUnpin for MoqCapability
impl UnwindSafe for MoqCapability
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.