pub enum RecordEntry<E = Entry>{
Present(E),
Hidden,
NA,
NotStored,
}Expand description
Represents the different ways the entry_address reference within an action can be interpreted
Variants§
Present(E)
The Action has an entry_address reference, and the Entry is accessible.
Hidden
The Action has an entry_address reference, but we are in a public context and the entry is private.
NA
The Action does not contain an entry_address reference, so there will never be an associated Entry.
NotStored
Implementations§
Source§impl<E> RecordEntry<E>
impl<E> RecordEntry<E>
Sourcepub fn new(
vis: Option<&EntryVisibility>,
maybe_entry: Option<E>,
) -> RecordEntry<E>
pub fn new( vis: Option<&EntryVisibility>, maybe_entry: Option<E>, ) -> RecordEntry<E>
Constructor based on Action data
Sourcepub fn as_option(&self) -> Option<&E>
pub fn as_option(&self) -> Option<&E>
Provides entry data by reference if it exists
Collapses the enum down to the two possibilities of extant or nonextant Entry data
Sourcepub fn into_option(self) -> Option<E>
pub fn into_option(self) -> Option<E>
Provides entry data as owned value if it exists.
Collapses the enum down to the two possibilities of extant or nonextant Entry data
Sourcepub fn to_app_option<A>(&self) -> Result<Option<A>, SerializedBytesError>
pub fn to_app_option<A>(&self) -> Result<Option<A>, SerializedBytesError>
Provides deserialized app entry if it exists
same as as_option but handles deserialization anything other than RecordEntry::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
Sourcepub fn as_ref<'a>(&'a self) -> RecordEntry<&'a E>
pub fn as_ref<'a>(&'a self) -> RecordEntry<&'a E>
Use a reference to the Entry, if present
Sourcepub fn to_grant_option(&self) -> Option<ZomeCallCapGrant>
pub fn to_grant_option(&self) -> Option<ZomeCallCapGrant>
Provides CapGrantEntry if it exists
same as as_option but handles cap grants anything other tha RecordEntry::Present for a Entry::CapGrant returns None
If no entry is available, return Hidden, else return Present
Sourcepub fn or_not_applicable(entry: Option<E>) -> RecordEntry<E>
pub fn or_not_applicable(entry: Option<E>) -> RecordEntry<E>
If no entry is available, return NotApplicable, else return Present
Sourcepub fn or_not_stored(entry: Option<E>) -> RecordEntry<E>
pub fn or_not_stored(entry: Option<E>) -> RecordEntry<E>
If no entry is available, return NotStored, else return Present
Trait Implementations§
Source§impl<E> Clone for RecordEntry<E>
impl<E> Clone for RecordEntry<E>
Source§fn clone(&self) -> RecordEntry<E>
fn clone(&self) -> RecordEntry<E>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<E> Debug for RecordEntry<E>
impl<E> Debug for RecordEntry<E>
Source§impl<'de, E> Deserialize<'de> for RecordEntry<E>
impl<'de, E> Deserialize<'de> for RecordEntry<E>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RecordEntry<E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RecordEntry<E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl<E> Eq for RecordEntry<E>
Source§impl<E> From<E> for RecordEntry<E>
impl<E> From<E> for RecordEntry<E>
Source§fn from(entry: E) -> RecordEntry<E>
fn from(entry: E) -> RecordEntry<E>
Source§impl<E> Hash for RecordEntry<E>
impl<E> Hash for RecordEntry<E>
Source§impl<E> PartialEq for RecordEntry<E>
impl<E> PartialEq for RecordEntry<E>
Source§impl<E> Serialize for RecordEntry<E>
impl<E> Serialize for RecordEntry<E>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl<E> StructuralPartialEq for RecordEntry<E>
Source§impl TryFrom<&RecordEntry> for SerializedBytes
impl TryFrom<&RecordEntry> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: &RecordEntry) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &RecordEntry) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<RecordEntry> for SerializedBytes
impl TryFrom<RecordEntry> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: RecordEntry) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: RecordEntry) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<SerializedBytes> for RecordEntry
impl TryFrom<SerializedBytes> for RecordEntry
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(sb: SerializedBytes) -> Result<RecordEntry, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<RecordEntry, SerializedBytesError>
Auto Trait Implementations§
impl<E> Freeze for RecordEntry<E>where
E: Freeze,
impl<E> RefUnwindSafe for RecordEntry<E>where
E: RefUnwindSafe,
impl<E> Send for RecordEntry<E>where
E: Send,
impl<E> Sync for RecordEntry<E>where
E: Sync,
impl<E> Unpin for RecordEntry<E>where
E: Unpin,
impl<E> UnsafeUnpin for RecordEntry<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for RecordEntry<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.