pub type CapClaimEntry = CapClaim;
Expand description

The data type written to the source chain to denote a capability claim

Aliased Type§

struct CapClaimEntry {
    pub tag: String,
    pub grantor: HoloHash<Agent>,
    pub secret: CapSecret,
}

Fields§

§tag: String

A string by which to later query for saved claims. This does not need to be unique within a source chain.

§grantor: HoloHash<Agent>

AgentPubKey of agent who authored the corresponding CapGrant.

§secret: CapSecret

The secret needed to exercise this capability. This is the only bit sent over the wire to attempt a remote call. Note that the grantor may have revoked the corresponding grant since we received the claim so claims are only ever a ‘best effort’ basis.

Implementations§

§

impl CapClaim

pub fn new(tag: String, grantor: HoloHash<Agent>, secret: CapSecret) -> CapClaim

Constructor.

pub fn secret(&self) -> &CapSecret

Access the secret.

pub fn tag(&self) -> &str

Access the tag

pub fn grantor(&self) -> &HoloHash<Agent>

Access the grantor

Trait Implementations§

§

impl<'arbitrary> Arbitrary<'arbitrary> for CapClaim

§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<CapClaim, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<CapClaim, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

impl Clone for CapClaim

§

fn clone(&self) -> CapClaim

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CapClaim

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CapClaim

§

fn deserialize<__D>( __deserializer: __D ) -> Result<CapClaim, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for CapClaim

§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq<CapClaim> for CapClaim

§

fn eq(&self, other: &CapClaim) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for CapClaim

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<SerializedBytes> for CapClaim

§

type Error = SerializedBytesError

The type returned in the event of a conversion error.
§

fn try_from(sb: SerializedBytes) -> Result<CapClaim, SerializedBytesError>

Performs the conversion.
§

impl Eq for CapClaim

§

impl StructuralEq for CapClaim

§

impl StructuralPartialEq for CapClaim