Struct hdk_crud::retrieval::get_latest_for_entry::GetLatestEntry
source · pub struct GetLatestEntry {}
Implementations§
source§impl GetLatestEntry
impl GetLatestEntry
sourcepub fn get_latest_for_entry<T: 'static + TryFrom<SerializedBytes, Error = SerializedBytesError>>(
&self,
entry_hash: EntryHash,
get_options: GetOptions
) -> ExternResult<Option<WireRecord<T>>>
pub fn get_latest_for_entry<T: 'static + TryFrom<SerializedBytes, Error = SerializedBytesError>>( &self, entry_hash: EntryHash, get_options: GetOptions ) -> ExternResult<Option<WireRecord<T>>>
If an entry at the entry_hash
has multiple updates to itself, this
function will sort through them by timestamp in order to return the contents
of the latest update. It also has the special behaviour of returning the
ORIGINAL ActionHash, as opposed to the ActionHash of the Action that performed
that latest update. This is useful if you want hashes in your application
to act consistently, almost acting as an “id” in a centralized system.
It simplifies traversal of the update tree, since all updates
made by the client can reference the original, instead of updates reference updates
Trait Implementations§
source§impl Clone for GetLatestEntry
impl Clone for GetLatestEntry
source§fn clone(&self) -> GetLatestEntry
fn clone(&self) -> GetLatestEntry
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GetLatestEntry
impl Debug for GetLatestEntry
source§impl PartialEq<GetLatestEntry> for GetLatestEntry
impl PartialEq<GetLatestEntry> for GetLatestEntry
source§fn eq(&self, other: &GetLatestEntry) -> bool
fn eq(&self, other: &GetLatestEntry) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GetLatestEntry
Auto Trait Implementations§
impl RefUnwindSafe for GetLatestEntry
impl Send for GetLatestEntry
impl Sync for GetLatestEntry
impl Unpin for GetLatestEntry
impl UnwindSafe for GetLatestEntry
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
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>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref