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

pub struct ChainHeader { /* fields omitted */ }

ChainHeader of a source chain "Item" The hash 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

Methods

impl ChainHeader
[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

entry_type getter

timestamp getter

link getter

entry_address getter

link_same_type getter

entry_signature getter

Trait Implementations

impl AddressableContent for ChainHeader
[src]

the Content that would be stored in a ContentAddressableStorage

restore/deserialize the original struct/type from serialized Content

the Address the Content would be available at once stored in a ContentAddressableStorage default implementation is provided as hashing Content with sha256 the default implementation should cover most use-cases it is critical that there are no hash collisions across all stored AddressableContent it is recommended to implement an "address space" prefix for address algorithms that don't offer strong cryptographic guarantees like sha et. al. Read more

impl ToEntry for ChainHeader
[src]

impl ToJson for ChainHeader
[src]

serialize self to a canonical JSON string

impl Clone for ChainHeader
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq<ChainHeader> for ChainHeader
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for ChainHeader
[src]

Formats the value using the given formatter. Read more

impl Serialize for ChainHeader
[src]

Serialize this value into the given Serde serializer. Read more

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

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl Send for ChainHeader

impl Sync for ChainHeader

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Same for T
[src]

Should always be Self

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