Struct hdk::prelude::header::Update[][src]

pub struct Update {
    pub author: HoloHash<Agent>,
    pub timestamp: Timestamp,
    pub header_seq: u32,
    pub prev_header: HoloHash<Header>,
    pub original_header_address: HoloHash<Header>,
    pub original_entry_address: HoloHash<Entry>,
    pub entry_type: EntryType,
    pub entry_hash: HoloHash<Entry>,
}

A header which specifies that some new Entry content is intended to be an update to some old Entry.

This header semantically updates an entry to a new entry. It has the following effects:

  • Create a new Entry
  • This is the header of that new entry
  • Create a metadata relationship between the original entry and this new header

The original header is required to prevent update loops: If you update A to B and B back to A, and then you don’t know which one came first, or how to break the loop.

Fields

author: HoloHash<Agent>timestamp: Timestampheader_seq: u32prev_header: HoloHash<Header>original_header_address: HoloHash<Header>original_entry_address: HoloHash<Entry>entry_type: EntryTypeentry_hash: HoloHash<Entry>

Implementations

impl Update[src]

pub fn from_builder(
    common: HeaderBuilderCommon,
    original_entry_address: HoloHash<Entry>,
    original_header_address: HoloHash<Header>,
    entry_type: EntryType,
    entry_hash: HoloHash<Entry>
) -> Update
[src]

Trait Implementations

impl Clone for Update[src]

impl Debug for Update[src]

impl<'de> Deserialize<'de> for Update[src]

impl Eq for Update[src]

impl From<(Update, HeaderBuilderCommon)> for Update[src]

impl Hash for Update[src]

impl HeaderBuilder<Update> for Update[src]

impl HeaderInner for Update[src]

impl PartialEq<Update> for Update[src]

impl Serialize for Update[src]

impl StructuralEq for Update[src]

impl StructuralPartialEq for Update[src]

impl<'_> TryFrom<&'_ Update> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a Header> for &'a Update[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<Header> for Update[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<SerializedBytes> for Update[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<Update> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Update

impl Send for Update

impl Sync for Update

impl Unpin for Update

impl UnwindSafe for Update

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,