Struct MoqCapability
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§
§impl MoqCapability
impl MoqCapability
pub fn new(root: impl Into<String>) -> MoqCapability
pub fn new(root: impl Into<String>) -> MoqCapability
Returns a capability under root that grants nothing yet.
pub fn with_publish(self, publish: impl Into<Prefixes>) -> MoqCapability
pub fn with_publish(self, publish: impl Into<Prefixes>) -> MoqCapability
Returns this capability with publish as the paths the holder may publish.
pub fn with_subscribe(self, subscribe: impl Into<Prefixes>) -> MoqCapability
pub fn with_subscribe(self, subscribe: impl Into<Prefixes>) -> MoqCapability
Returns this capability with subscribe as the paths the holder may subscribe to.
Trait Implementations§
§impl Capability for MoqCapability
impl Capability for MoqCapability
§fn permits(&self, other: &MoqCapability) -> bool
fn permits(&self, other: &MoqCapability) -> bool
§impl Clone for MoqCapability
impl Clone for MoqCapability
§fn clone(&self) -> MoqCapability
fn clone(&self) -> MoqCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for MoqCapability
impl Debug for MoqCapability
§impl<'de> Deserialize<'de> for MoqCapability
impl<'de> Deserialize<'de> for MoqCapability
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MoqCapability, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MoqCapability, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for MoqCapability
§impl PartialEq for MoqCapability
impl PartialEq for MoqCapability
§impl Serialize for MoqCapability
impl Serialize for MoqCapability
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for MoqCapability
§impl TryFrom<Wire> for MoqCapability
impl TryFrom<Wire> for MoqCapability
§type Error = InvalidPrefix
type Error = InvalidPrefix
§fn try_from(
wire: Wire,
) -> Result<MoqCapability, <MoqCapability as TryFrom<Wire>>::Error>
fn try_from( wire: Wire, ) -> Result<MoqCapability, <MoqCapability as TryFrom<Wire>>::Error>
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.