Enum hdk::prelude::EntryCreationHeader
[−]Expand description
Either a Header::Create
or a Header::Update
.
These headers both create a new instance of an Entry
.
Variants
Create(Create)
A Header::Create
that creates a new instance of an Entry
.
Update(Update)
A Header::Update
that creates a new instance of an Entry
.
Implementations
impl EntryCreationHeader
impl EntryCreationHeader
The author of this header.
pub fn header_seq(&self) -> &u32
pub fn header_seq(&self) -> &u32
The header sequence number of this header.
pub fn prev_header(&self) -> &HoloHash<Header>
pub fn prev_header(&self) -> &HoloHash<Header>
The previous HeaderHash
of the previous header in the source chain.
pub fn entry_type(&self) -> &EntryType
pub fn entry_type(&self) -> &EntryType
pub fn entry_hash(&self) -> &HoloHash<Entry>
pub fn entry_hash(&self) -> &HoloHash<Entry>
pub fn app_entry_type(&self) -> Option<&AppEntryType>
pub fn app_entry_type(&self) -> Option<&AppEntryType>
The AppEntryType
of the Entry
being created if it
is an application defined Entry
.
pub fn is_agent_entry_type(&self) -> bool
pub fn is_agent_entry_type(&self) -> bool
Returns true
if this header creates an EntryType::AgentPubKey
Entry
.
pub fn is_cap_claim_entry_type(&self) -> bool
pub fn is_cap_claim_entry_type(&self) -> bool
Returns true
if this header creates an EntryType::CapClaim
Entry
.
pub fn is_cap_grant_entry_type(&self) -> bool
pub fn is_cap_grant_entry_type(&self) -> bool
Returns true
if this header creates an EntryType::CapGrant
Entry
.
Trait Implementations
impl Clone for EntryCreationHeader
impl Clone for EntryCreationHeader
fn clone(&self) -> EntryCreationHeader
fn clone(&self) -> EntryCreationHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for EntryCreationHeader
impl Debug for EntryCreationHeader
impl<'de> Deserialize<'de> for EntryCreationHeader
impl<'de> Deserialize<'de> for EntryCreationHeader
fn deserialize<__D>(
__deserializer: __D
) -> Result<EntryCreationHeader, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EntryCreationHeader, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl From<Create> for EntryCreationHeader
impl From<Create> for EntryCreationHeader
fn from(c: Create) -> EntryCreationHeader
fn from(c: Create) -> EntryCreationHeader
Converts to this type from the input type.
impl From<EntryCreationHeader> for Header
impl From<EntryCreationHeader> for Header
fn from(e: EntryCreationHeader) -> Header
fn from(e: EntryCreationHeader) -> Header
Converts to this type from the input type.
impl From<Update> for EntryCreationHeader
impl From<Update> for EntryCreationHeader
fn from(u: Update) -> EntryCreationHeader
fn from(u: Update) -> EntryCreationHeader
Converts to this type from the input type.
impl HashableContent for EntryCreationHeader
impl HashableContent for EntryCreationHeader
Allows a EntryCreationHeader
to hash the same bytes as
the equivalent Header
variant without needing to clone the header.
fn hash_type(&self) -> <EntryCreationHeader as HashableContent>::HashType
fn hash_type(&self) -> <EntryCreationHeader as HashableContent>::HashType
The HashType which this content will be hashed to
fn hashable_content(&self) -> HashableContentBytes
fn hashable_content(&self) -> HashableContentBytes
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
impl PartialEq<EntryCreationHeader> for EntryCreationHeader
impl PartialEq<EntryCreationHeader> for EntryCreationHeader
fn eq(&self, other: &EntryCreationHeader) -> bool
fn eq(&self, other: &EntryCreationHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &EntryCreationHeader) -> bool
fn ne(&self, other: &EntryCreationHeader) -> bool
This method tests for !=
.
impl Serialize for EntryCreationHeader
impl Serialize for EntryCreationHeader
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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
impl<'_> TryFrom<&'_ EntryCreationHeader> for SerializedBytes
impl<'_> TryFrom<&'_ EntryCreationHeader> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(
t: &EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: &EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
impl TryFrom<EntryCreationHeader> for SerializedBytes
impl TryFrom<EntryCreationHeader> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(
t: EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
impl TryFrom<Header> for EntryCreationHeader
impl TryFrom<Header> for EntryCreationHeader
type Error = WrongHeaderError
type Error = WrongHeaderError
The type returned in the event of a conversion error.
fn try_from(
value: Header
) -> Result<EntryCreationHeader, <EntryCreationHeader as TryFrom<Header>>::Error>
fn try_from(
value: Header
) -> Result<EntryCreationHeader, <EntryCreationHeader as TryFrom<Header>>::Error>
Performs the conversion.
impl TryFrom<SerializedBytes> for EntryCreationHeader
impl TryFrom<SerializedBytes> for EntryCreationHeader
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(
sb: SerializedBytes
) -> Result<EntryCreationHeader, SerializedBytesError>
fn try_from(
sb: SerializedBytes
) -> Result<EntryCreationHeader, SerializedBytesError>
Performs the conversion.
impl StructuralPartialEq for EntryCreationHeader
Auto Trait Implementations
impl RefUnwindSafe for EntryCreationHeader
impl Send for EntryCreationHeader
impl Sync for EntryCreationHeader
impl Unpin for EntryCreationHeader
impl UnwindSafe for EntryCreationHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn 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;
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;
T: Future, type Output = <T as Future>::Output;
sourcefn 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;
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;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more