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
sourceimpl EntryCreationHeader
impl EntryCreationHeader
The author of this header.
sourcepub fn header_seq(&self) -> &u32
pub fn header_seq(&self) -> &u32
The header sequence number of this header.
sourcepub fn prev_header(&self) -> &HeaderHash
pub fn prev_header(&self) -> &HeaderHash
The previous HeaderHash
of the previous header in the source chain.
sourcepub fn entry_type(&self) -> &EntryType
pub fn entry_type(&self) -> &EntryType
sourcepub fn entry_hash(&self) -> &EntryHash
pub fn entry_hash(&self) -> &EntryHash
sourcepub 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
.
sourcepub 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
.
sourcepub 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
.
sourcepub 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
sourceimpl Clone for EntryCreationHeader
impl Clone for EntryCreationHeader
sourcefn 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
sourceimpl Debug for EntryCreationHeader
impl Debug for EntryCreationHeader
sourceimpl<'de> Deserialize<'de> for EntryCreationHeader
impl<'de> Deserialize<'de> for EntryCreationHeader
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Create> for EntryCreationHeader
impl From<Create> for EntryCreationHeader
sourceimpl From<EntryCreationHeader> for Header
impl From<EntryCreationHeader> for Header
sourcefn from(e: EntryCreationHeader) -> Self
fn from(e: EntryCreationHeader) -> Self
Converts to this type from the input type.
sourceimpl From<Update> for EntryCreationHeader
impl From<Update> for EntryCreationHeader
sourceimpl 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.
sourcefn 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
sourceimpl PartialEq<EntryCreationHeader> for EntryCreationHeader
impl PartialEq<EntryCreationHeader> for EntryCreationHeader
sourcefn 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
sourcefn ne(&self, other: &EntryCreationHeader) -> bool
fn ne(&self, other: &EntryCreationHeader) -> bool
This method tests for !=
.
sourceimpl Serialize for EntryCreationHeader
impl Serialize for EntryCreationHeader
sourceimpl 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.
sourcefn try_from(
t: &EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: &EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl 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.
sourcefn try_from(
t: EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: EntryCreationHeader
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<Header> for EntryCreationHeader
impl TryFrom<Header> for EntryCreationHeader
sourceimpl 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.
sourcefn 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> 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