pub type CapGrantEntry = ZomeCallCapGrant;
Expand description

The data type written to the source chain when explicitly granting a capability. NB: this is not simply CapGrant, because the CapGrant::ChainAuthor grant is already implied by Entry::Agent, so that should not be committed to a chain. This is a type alias because if we add other capability types in the future, we may want to include them

Aliased Type§

struct CapGrantEntry {
    pub tag: String,
    pub access: CapAccess,
    pub functions: GrantedFunctions,
}

Fields§

§tag: String

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

§access: CapAccess

Specifies who may claim this capability, and by what means

§functions: GrantedFunctions

Set of functions to which this capability grants ZomeCall access

Implementations§

§

impl ZomeCallCapGrant

pub fn new( tag: String, access: CapAccess, functions: GrantedFunctions ) -> ZomeCallCapGrant

Constructor

Trait Implementations§

§

impl<'arbitrary> Arbitrary<'arbitrary> for ZomeCallCapGrant

§

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

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

fn arbitrary_take_rest( u: Unstructured<'arbitrary> ) -> Result<ZomeCallCapGrant, 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 ZomeCallCapGrant

§

fn clone(&self) -> ZomeCallCapGrant

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 ZomeCallCapGrant

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ZomeCallCapGrant

§

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

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

impl Hash for ZomeCallCapGrant

§

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<ZomeCallCapGrant> for ZomeCallCapGrant

§

fn eq(&self, other: &ZomeCallCapGrant) -> 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 ZomeCallCapGrant

§

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 Eq for ZomeCallCapGrant

§

impl StructuralEq for ZomeCallCapGrant

§

impl StructuralPartialEq for ZomeCallCapGrant