Struct hdk::prelude::Element[][src]

pub struct Element { /* fields omitted */ }

a chain element which is a triple containing the signature of the header along with the entry if the header type has one.

Implementations

impl Element[src]

pub fn new(
    signed_header: SignedHeaderHashed,
    maybe_entry: Option<Entry>
) -> Element
[src]

Raw element constructor. Used only when we know that the values are valid.

pub fn into_inner(self) -> (SignedHeaderHashed, ElementEntry)[src]

Break this element into its components

pub fn signed_header(&self) -> &SignedHeaderHashed[src]

The inner signed header

pub fn signature(&self) -> &Signature[src]

Access the signature portion of this triple.

pub fn header_address(&self) -> &HoloHash<Header>[src]

Access the header address

pub fn header(&self) -> &Header[src]

Access the Header portion of this triple.

pub fn header_hashed(&self) -> &HoloHashed<Header>[src]

Access the HeaderHashed portion.

pub fn entry(&self) -> &ElementEntry[src]

Access the Entry portion of this triple as a ElementEntry, which includes the context around the presence or absence of the entry.

Trait Implementations

impl Clone for Element[src]

impl Debug for Element[src]

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

impl From<Element> for Option<Entry>[src]

impl PartialEq<Element> for Element[src]

impl Serialize for Element[src]

impl StructuralPartialEq for Element[src]

impl<'_> TryFrom<&'_ Element> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<Element> for DeleteLink[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<Element> for CreateLink[src]

type Error = WrongHeaderError

The type returned in the event of a conversion error.

impl TryFrom<Element> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<SerializedBytes> for Element[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Element

impl Send for Element

impl Sync for Element

impl Unpin for Element

impl UnwindSafe for Element

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

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