Enum hdk::prelude::Header [−][src]
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)
CreateLink(CreateLink)
DeleteLink(DeleteLink)
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]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Header, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Header, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for Header
[src]
impl<'_> From<&'_ Header> for HeaderType
[src]
pub fn from(header: &Header) -> HeaderType
[src]
impl<I> From<I> for Header where
I: HeaderInner,
[src]
I: HeaderInner,
impl HashableContent for Header
[src]
type HashType = Header
The HashType which this content will be hashed to
pub fn hash_type(&self) -> <Header as HashableContent>::HashType
[src]
pub fn hashable_content(&self) -> HashableContentBytes
[src]
impl PartialEq<Header> for Header
[src]
impl Serialize for Header
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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.
pub fn try_from(t: &Header) -> Result<SerializedBytes, SerializedBytesError>
[src]
impl<'a> TryFrom<&'a Header> for &'a DeleteLink
[src]
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>
[src]
value: &'a Header
) -> Result<&'a DeleteLink, <&'a DeleteLink as TryFrom<&'a Header>>::Error>
impl<'a> TryFrom<&'a Header> for &'a Update
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: &'a Header
) -> Result<&'a Update, <&'a Update as TryFrom<&'a Header>>::Error>
[src]
value: &'a Header
) -> Result<&'a Update, <&'a Update as TryFrom<&'a Header>>::Error>
impl<'a> TryFrom<&'a Header> for &'a CreateLink
[src]
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>
[src]
value: &'a Header
) -> Result<&'a CreateLink, <&'a CreateLink as TryFrom<&'a Header>>::Error>
impl<'a> TryFrom<&'a Header> for &'a Delete
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: &'a Header
) -> Result<&'a Delete, <&'a Delete as TryFrom<&'a Header>>::Error>
[src]
value: &'a Header
) -> Result<&'a Delete, <&'a Delete as TryFrom<&'a Header>>::Error>
impl TryFrom<Header> for SerializedBytes
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(t: Header) -> Result<SerializedBytes, SerializedBytesError>
[src]
impl TryFrom<Header> for DeleteLink
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: Header
) -> Result<DeleteLink, <DeleteLink as TryFrom<Header>>::Error>
[src]
value: Header
) -> Result<DeleteLink, <DeleteLink as TryFrom<Header>>::Error>
impl TryFrom<Header> for CreateLink
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: Header
) -> Result<CreateLink, <CreateLink as TryFrom<Header>>::Error>
[src]
value: Header
) -> Result<CreateLink, <CreateLink as TryFrom<Header>>::Error>
impl TryFrom<Header> for Update
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: Header
) -> Result<Update, <Update as TryFrom<Header>>::Error>
[src]
value: Header
) -> Result<Update, <Update as TryFrom<Header>>::Error>
impl TryFrom<Header> for Delete
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: Header
) -> Result<Delete, <Delete as TryFrom<Header>>::Error>
[src]
value: Header
) -> Result<Delete, <Delete as TryFrom<Header>>::Error>
impl TryFrom<SerializedBytes> for Header
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(sb: SerializedBytes) -> Result<Header, SerializedBytesError>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,