Enum hdk::prelude::element::ElementEntry [−][src]
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.
The Header has an entry_address reference, but we are in a public context and the entry is private.
The Header does not contain an entry_address reference.
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]
A: TryFrom<SerializedBytes, Error = SerializedBytesError>,
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]
pub fn clone(&self) -> ElementEntry
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ElementEntry
[src]
impl<'de> Deserialize<'de> for ElementEntry
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ElementEntry, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<ElementEntry, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for ElementEntry
[src]
impl PartialEq<ElementEntry> for ElementEntry
[src]
pub fn eq(&self, other: &ElementEntry) -> bool
[src]
pub fn ne(&self, other: &ElementEntry) -> bool
[src]
impl Serialize for ElementEntry
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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.
pub fn try_from(
t: &ElementEntry
) -> Result<SerializedBytes, SerializedBytesError>
[src]
t: &ElementEntry
) -> Result<SerializedBytes, SerializedBytesError>
impl TryFrom<ElementEntry> for SerializedBytes
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(
t: ElementEntry
) -> Result<SerializedBytes, SerializedBytesError>
[src]
t: ElementEntry
) -> Result<SerializedBytes, SerializedBytesError>
impl TryFrom<SerializedBytes> for ElementEntry
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(
sb: SerializedBytes
) -> Result<ElementEntry, SerializedBytesError>
[src]
sb: SerializedBytes
) -> Result<ElementEntry, SerializedBytesError>
Auto Trait Implementations
impl RefUnwindSafe for ElementEntry
impl Send for ElementEntry
impl Sync for ElementEntry
impl Unpin for ElementEntry
impl UnwindSafe for ElementEntry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,