Struct hdk::prelude::element::Element [−][src]
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]
signed_header: SignedHeaderHashed,
maybe_entry: Option<Entry>
) -> Element
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]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Element, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Element, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl From<Element> for Option<Entry>
[src]
impl PartialEq<Element> for Element
[src]
impl Serialize for Element
[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 StructuralPartialEq for Element
[src]
impl<'_> TryFrom<&'_ Element> for SerializedBytes
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(t: &Element) -> Result<SerializedBytes, SerializedBytesError>
[src]
impl TryFrom<Element> for DeleteLink
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: Element
) -> Result<DeleteLink, <DeleteLink as TryFrom<Element>>::Error>
[src]
value: Element
) -> Result<DeleteLink, <DeleteLink as TryFrom<Element>>::Error>
impl TryFrom<Element> for CreateLink
[src]
type Error = WrongHeaderError
The type returned in the event of a conversion error.
pub fn try_from(
value: Element
) -> Result<CreateLink, <CreateLink as TryFrom<Element>>::Error>
[src]
value: Element
) -> Result<CreateLink, <CreateLink as TryFrom<Element>>::Error>
impl TryFrom<Element> for SerializedBytes
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(t: Element) -> Result<SerializedBytes, SerializedBytesError>
[src]
impl TryFrom<SerializedBytes> for Element
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
pub fn try_from(sb: SerializedBytes) -> Result<Element, SerializedBytesError>
[src]
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]
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<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>,