Enum hdk::prelude::Header[][src]

pub enum Header {
    Dna(Dna),
    AgentValidationPkg(AgentValidationPkg),
    InitZomesComplete(InitZomesComplete),
    CreateLink(CreateLink),
    DeleteLink(DeleteLink),
    OpenChain(OpenChain),
    CloseChain(CloseChain),
    Create(Create),
    Update(Update),
    Delete(Delete),
}

Header contains variants for each type of header.

This struct really defines a local source chain, in the sense that it implements the pointers between hashes that a hash chain relies on, which are then used to check the integrity of data using cryptographic hash functions.

Variants

Dna(Dna)
AgentValidationPkg(AgentValidationPkg)
InitZomesComplete(InitZomesComplete)
OpenChain(OpenChain)
CloseChain(CloseChain)
Create(Create)
Update(Update)
Delete(Delete)

Implementations

impl Header[src]

pub fn entry_data(&self) -> Option<(&HoloHash<Entry>, &EntryType)>[src]

Returns the address and entry type of the Entry, if applicable.

pub fn entry_hash(&self) -> Option<&HoloHash<Entry>>[src]

pub fn entry_type(&self) -> Option<&EntryType>[src]

pub fn header_type(&self) -> HeaderType[src]

pub fn author(&self) -> &HoloHash<Agent>[src]

returns the public key of the agent who signed this header.

pub fn timestamp(&self) -> Timestamp[src]

returns the timestamp of when the header was created

pub fn header_seq(&self) -> u32[src]

returns the sequence ordinal of this header

pub fn prev_header(&self) -> Option<&HoloHash<Header>>[src]

returns the previous header except for the DNA header which doesn’t have a previous

Trait Implementations

impl Clone for Header[src]

impl Debug for Header[src]

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

impl Eq for Header[src]

impl<'_> From<&'_ Header> for HeaderType[src]

impl<I> From<I> for Header where
    I: HeaderInner
[src]

impl HashableContent for Header[src]

type HashType = Header

The HashType which this content will be hashed to

impl PartialEq<Header> for Header[src]

impl Serialize for Header[src]

impl StructuralEq for Header[src]

impl StructuralPartialEq for Header[src]

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

type Error = SerializedBytesError

The type returned in the event of a conversion error.

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

type Error = WrongHeaderError

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<'a> TryFrom<&'a Header> for &'a CreateLink[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

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

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<Header> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<Header> for DeleteLink[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<Header> for CreateLink[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<Header> for Delete[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<SerializedBytes> for Header[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Header

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

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>,