Enum hdk::prelude::ElementEntry[][src]

pub enum ElementEntry {
    Present(Entry),
    Hidden,
    NotApplicable,
    NotStored,
}

Represents the different ways the entry_address reference within a Header can be intepreted

Variants

Present(Entry)

The Header has an entry_address reference, and the Entry is accessible.

Hidden

The Header has an entry_address reference, but we are in a public context and the entry is private.

NotApplicable

The Header does not contain an entry_address reference.

NotStored

The Header has an entry but was stored without it. This can happen when you receive gossip of just a header when the header type is a [NewEntryHeader]

Implementations

impl ElementEntry[src]

pub fn as_option(&self) -> Option<&Entry>[src]

Provides entry data by reference if it exists

Collapses the enum down to the two possibilities of extant or nonextant Entry data

pub fn into_option(self) -> Option<Entry>[src]

Provides entry data as owned value if it exists.

Collapses the enum down to the two possibilities of extant or nonextant Entry data

pub fn to_app_option<A>(&self) -> Result<Option<A>, SerializedBytesError> where
    A: TryFrom<SerializedBytes, Error = SerializedBytesError>, 
[src]

Provides deserialized app entry if it exists

same as as_option but handles deserialization anything other than ElementEntry::Present returns None a present entry that fails to deserialize cleanly is an error a present entry that deserializes cleanly is returned as the provided type A

pub fn to_grant_option(&self) -> Option<ZomeCallCapGrant>[src]

Provides CapGrantEntry if it exists

same as as_option but handles cap grants anything other than ElementEntry::Present for a Entry::CapGrant returns None

Trait Implementations

impl Clone for ElementEntry[src]

impl Debug for ElementEntry[src]

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

impl Eq for ElementEntry[src]

impl PartialEq<ElementEntry> for ElementEntry[src]

impl Serialize for ElementEntry[src]

impl StructuralEq for ElementEntry[src]

impl StructuralPartialEq for ElementEntry[src]

impl<'_> TryFrom<&'_ ElementEntry> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<ElementEntry> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<SerializedBytes> for ElementEntry[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

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>,