Enum holochain_zome_types::header::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),
}
Expand description
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)
Tuple Fields of Dna
0: Dna
AgentValidationPkg(AgentValidationPkg)
Tuple Fields of AgentValidationPkg
InitZomesComplete(InitZomesComplete)
Tuple Fields of InitZomesComplete
CreateLink(CreateLink)
Tuple Fields of CreateLink
0: CreateLink
DeleteLink(DeleteLink)
Tuple Fields of DeleteLink
0: DeleteLink
OpenChain(OpenChain)
Tuple Fields of OpenChain
0: OpenChain
CloseChain(CloseChain)
Tuple Fields of CloseChain
0: CloseChain
Create(Create)
Tuple Fields of Create
0: Create
Update(Update)
Tuple Fields of Update
0: Update
Delete(Delete)
Tuple Fields of Delete
0: Delete
Implementations
pub fn from_countersigning_data(
entry_hash: EntryHash,
session_data: &CounterSigningSessionData,
author: AgentPubKey
) -> Result<Self, CounterSigningError>
pub fn from_countersigning_data(
entry_hash: EntryHash,
session_data: &CounterSigningSessionData,
author: AgentPubKey
) -> Result<Self, CounterSigningError>
Construct a Header from the HeaderBase and associated session data.
Some necessary extra mutators for lenses/prisms over Headers
returns a mutable reference to the author
returns a mutable reference to the sequence ordinal of this header
returns the previous header except for the DNA header which doesn’t have a previous
Returns the address and entry type of the Entry, if applicable.
returns the public key of the agent who signed this header.
pub fn rebase_on(
&mut self,
new_prev_header: HeaderHash,
new_prev_seq: u32,
new_prev_timestamp: Timestamp
) -> Result<(), HeaderError>
returns the sequence ordinal of this header
returns the previous header except for the DNA header which doesn’t have a previous
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Return a subset of the content, either as SerializedBytes “content”, which will be used to compute the hash, or as an already precomputed hash which will be used directly Read more
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Header
impl UnwindSafe for Header
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
impl<T, C> HashableContentExtSync<T> for C where
T: HashTypeSync,
C: HashableContent<HashType = T>,
impl<T, C> HashableContentExtSync<T> for C where
T: HashTypeSync,
C: HashableContent<HashType = T>,
Move into a HoloHashed
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more