pub struct Capability {
pub issuer: Address,
pub params: Json,
}Fields§
§issuer: Address§params: JsonImplementations§
Source§impl Capability
Capability is defined in the wit bindings, but constructors and methods here.
A Capability is a combination of an Address and a set of Params (a serialized
JSON string by convention). Capabilities are attached to messages to either share
that capability with the receiving process, or to prove that a process has
authority to perform a certain action.
impl Capability
Capability is defined in the wit bindings, but constructors and methods here.
A Capability is a combination of an Address and a set of Params (a serialized
JSON string by convention). Capabilities are attached to messages to either share
that capability with the receiving process, or to prove that a process has
authority to perform a certain action.
Sourcepub fn new<T, U>(address: T, params: U) -> Capability
pub fn new<T, U>(address: T, params: U) -> Capability
Create a new Capability. Takes an Address and a parameter, which is a JSON string.
Sourcepub fn params_json(&self) -> Result<Value, Error>
pub fn params_json(&self) -> Result<Value, Error>
Read the params from a Capability as a serde_json::Value.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl<'a> Deserialize<'a> for Capability
impl<'a> Deserialize<'a> for Capability
Source§fn deserialize<D>(deserializer: D) -> Result<Capability, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Capability, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Capability
impl Display for Capability
Source§impl From<&Capability> for Capability
impl From<&Capability> for Capability
Source§fn from(input: &Capability) -> Self
fn from(input: &Capability) -> Self
Converts to this type from the input type.
Source§impl<T, U> From<(T, U)> for Capability
impl<T, U> From<(T, U)> for Capability
Source§impl Hash for Capability
impl Hash for Capability
Source§impl PartialEq for Capability
impl PartialEq for Capability
Source§impl Serialize for Capability
impl Serialize for Capability
impl Eq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnwindSafe for Capability
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more