Struct holochain_integrity_types::record::Record
source · [−]pub struct Record {
pub signed_action: SignedActionHashed,
pub entry: RecordEntry,
}
Expand description
a chain record containing the signed action along with the entry if the action type has one.
Fields
signed_action: SignedActionHashed
The signed action for this record
entry: RecordEntry
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
sourceimpl 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.
sourcepub fn privatized(self) -> Self
pub fn privatized(self) -> Self
If the Record contains private entry data, set the RecordEntry to Hidden so that it cannot be leaked
sourcepub fn into_inner(self) -> (SignedActionHashed, RecordEntry)
pub fn into_inner(self) -> (SignedActionHashed, RecordEntry)
Break this record into its components
sourcepub fn signed_action(&self) -> &SignedActionHashed
pub fn signed_action(&self) -> &SignedActionHashed
The inner signed-action
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.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl TryFrom<&Record> for SerializedBytes
impl TryFrom<&Record> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: &Record) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &Record) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<Record> for CreateLink
impl TryFrom<Record> for CreateLink
sourceimpl TryFrom<Record> for DeleteLink
impl TryFrom<Record> for DeleteLink
sourceimpl TryFrom<Record> for SerializedBytes
impl TryFrom<Record> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: Record) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: Record) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<SerializedBytes> for Record
impl TryFrom<SerializedBytes> for Record
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(sb: SerializedBytes) -> Result<Record, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<Record, SerializedBytesError>
Performs the conversion.
impl StructuralPartialEq for Record
Auto Trait Implementations
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more