Enum hdk::prelude::CapAccess[][src]

pub enum CapAccess {
    Unrestricted,
    Transferable {
        secret: CapSecret,
    },
    Assigned {
        secret: CapSecret,
        assignees: HashSet<HoloHash<Agent>, RandomState>,
    },
}

Represents access requirements for capability grants.

Variants

Unrestricted

No restriction: callable by anyone.

Transferable

Callable by anyone who can provide the secret.

Fields of Transferable

secret: CapSecret

The secret.

Assigned

Callable by anyone in the list of assignees who possesses the secret.

Fields of Assigned

secret: CapSecret

The secret.

assignees: HashSet<HoloHash<Agent>, RandomState>

Agents who can use this grant.

Trait Implementations

impl Clone for CapAccess[src]

impl Debug for CapAccess[src]

impl<'de> Deserialize<'de> for CapAccess[src]

impl Eq for CapAccess[src]

impl From<()> for CapAccess[src]

Implements ().into() shorthand for CapAccess::Unrestricted

impl From<(CapSecret, HashSet<HoloHash<Agent>, RandomState>)> for CapAccess[src]

Implements (secret, assignees).into() shorthand for CapAccess::Assigned { secret, assignees }

impl From<(CapSecret, HoloHash<Agent>)> for CapAccess[src]

Implements (secret, agent_pub_key).into() shorthand for CapAccess::Assigned { secret, assignees: hashset!{ agent } }

impl From<CapSecret> for CapAccess[src]

Implements secret.into() shorthand for CapAccess::Transferable(secret)

impl PartialEq<CapAccess> for CapAccess[src]

impl Serialize for CapAccess[src]

impl StructuralEq for CapAccess[src]

impl StructuralPartialEq for CapAccess[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,