Enum holochain_types::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),
}
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
0: Dna
AgentValidationPkg(AgentValidationPkg)
Tuple Fields
InitZomesComplete(InitZomesComplete)
Tuple Fields
CreateLink(CreateLink)
Tuple Fields
0: CreateLink
DeleteLink(DeleteLink)
Tuple Fields
0: DeleteLink
OpenChain(OpenChain)
Tuple Fields
0: OpenChain
CloseChain(CloseChain)
Tuple Fields
0: CloseChain
Create(Create)
Tuple Fields
0: Create
Update(Update)
Tuple Fields
0: Update
Delete(Delete)
Tuple Fields
0: Delete
Implementations
pub fn from_countersigning_data(
entry_hash: HoloHash<Entry>,
session_data: &CounterSigningSessionData,
author: HoloHash<Agent>
) -> Result<Header, CounterSigningError>
pub fn from_countersigning_data(
entry_hash: HoloHash<Entry>,
session_data: &CounterSigningSessionData,
author: HoloHash<Agent>
) -> Result<Header, 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: HoloHash<Header>,
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
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Header, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Header, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
The HashType which this content will be hashed to
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
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = WrongHeaderError
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: &'a Header
) -> Result<&'a DeleteLink, <&'a DeleteLink as TryFrom<&'a Header>>::Error>
pub fn try_from(
value: &'a Header
) -> Result<&'a DeleteLink, <&'a DeleteLink as TryFrom<&'a Header>>::Error>
Performs the conversion.
type Error = WrongHeaderError
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: &'a Header
) -> Result<&'a CreateLink, <&'a CreateLink as TryFrom<&'a Header>>::Error>
pub fn try_from(
value: &'a Header
) -> Result<&'a CreateLink, <&'a CreateLink as TryFrom<&'a Header>>::Error>
Performs the conversion.
type Error = WrongHeaderError
type Error = WrongHeaderError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = WrongHeaderError
type Error = WrongHeaderError
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
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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
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