[][src]Struct holochain_core_types::chain_header::ChainHeader

pub struct ChainHeader { /* fields omitted */ }

ChainHeader of a source chain "Item" The address of the ChainHeader is used as the Item's key in the source chain hash table ChainHeaders are linked to next header in chain and next header of same type in chain

Implementations

impl ChainHeader[src]

pub fn new(
    entry_type: &EntryType,
    entry_address: &Address,
    provenances: &[Provenance],
    link: &Option<Address>,
    link_same_type: &Option<Address>,
    link_update_delete: &Option<Address>,
    timestamp: &Iso8601
) -> Self
[src]

build a new ChainHeader from a chain, entry type and entry. a ChainHeader is immutable, but the chain is mutable if chain.push() is used. this means that a header becomes invalid and useless as soon as the chain is mutated the only valid usage of a header is to immediately push it onto a chain in a Pair. normally (outside unit tests) the generation of valid headers is internal to the chain::SourceChain trait and should not need to be handled manually

@see chain::entry::Entry

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

entry_type getter

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

timestamp getter

link getter

pub fn entry_address(&self) -> &Address[src]

entry_address getter

link_same_type getter

link_update_delete getter

pub fn provenances(&self) -> &Vec<Provenance>[src]

entry_signature getter

Trait Implementations

impl AddressableContent for ChainHeader[src]

impl Clone for ChainHeader[src]

impl Debug for ChainHeader[src]

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

impl Eq for ChainHeader[src]

impl<'a> From<&'a ChainHeader> for JsonString[src]

impl From<ChainHeader> for JsonString[src]

impl Hash for ChainHeader[src]

impl PartialEq<ChainHeader> for ChainHeader[src]

impl Serialize for ChainHeader[src]

impl StructuralEq for ChainHeader[src]

impl StructuralPartialEq for ChainHeader[src]

impl<'a> TryFrom<&'a JsonString> for ChainHeader[src]

type Error = JsonError

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for ChainHeader[src]

type Error = JsonError

The type returned in the event of a conversion error.

Auto Trait Implementations

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> Clone for T where
    T: Clone
[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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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