Struct holochain_integrity_types::record::Record
source · pub struct Record<A = SignedActionHashed> {
pub signed_action: A,
pub entry: RecordEntry<Entry>,
}
Expand description
a chain record containing the signed action along with the entry if the action type has one.
Fields§
§signed_action: A
The signed action for this record
entry: RecordEntry<Entry>
If there is an entry associated with this action it will be here. If not, there will be an enum variant explaining the reason.
Implementations§
source§impl Record
impl Record
sourcepub fn new(
signed_action: SignedActionHashed,
maybe_entry: Option<Entry>,
) -> Self
pub fn new( signed_action: SignedActionHashed, maybe_entry: Option<Entry>, ) -> Self
Raw record constructor. Used only when we know that the values are valid. NOTE: this will NOT hide private entry data if present!
sourcepub fn privatized(self) -> (Self, Option<Entry>)
pub fn privatized(self) -> (Self, Option<Entry>)
If the Record contains private entry data, set the RecordEntry to Hidden so that it cannot be leaked. If the entry was hidden, return it separately.
sourcepub fn action_address(&self) -> &ActionHash
pub fn action_address(&self) -> &ActionHash
Access the action address from this record’s signed action
sourcepub fn action_hashed(&self) -> &ActionHashed
pub fn action_hashed(&self) -> &ActionHashed
Access the ActionHashed from this record’s signed action portion
sourcepub fn entry(&self) -> &RecordEntry
pub fn entry(&self) -> &RecordEntry
Access the Entry portion of this record as a RecordEntry, which includes the context around the presence or absence of the entry.
source§impl<A> Record<A>
impl<A> Record<A>
sourcepub fn into_inner(self) -> (A, RecordEntry)
pub fn into_inner(self) -> (A, RecordEntry)
Break this record into its components
sourcepub fn signed_action(&self) -> &A
pub fn signed_action(&self) -> &A
The inner signed-action
Trait Implementations§
source§impl<'de, A> Deserialize<'de> for Record<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for Record<A>where
A: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl TryFrom<&Record> for SerializedBytes
impl TryFrom<&Record> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(t: &Record) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &Record) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<Record> for CreateLink
impl TryFrom<Record> for CreateLink
source§impl TryFrom<Record> for DeleteLink
impl TryFrom<Record> for DeleteLink
source§impl TryFrom<Record> for SerializedBytes
impl TryFrom<Record> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(t: Record) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: Record) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<SerializedBytes> for Record
impl TryFrom<SerializedBytes> for Record
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(sb: SerializedBytes) -> Result<Record, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<Record, SerializedBytesError>
impl<A: Eq> Eq for Record<A>
impl<A> StructuralPartialEq for Record<A>
Auto Trait Implementations§
impl<A> Freeze for Record<A>where
A: Freeze,
impl<A> RefUnwindSafe for Record<A>where
A: RefUnwindSafe,
impl<A> Send for Record<A>where
A: Send,
impl<A> Sync for Record<A>where
A: Sync,
impl<A> Unpin for Record<A>where
A: Unpin,
impl<A> UnwindSafe for Record<A>where
A: UnwindSafe,
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§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<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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§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<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 more