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) -> &HoloHash<Header>
pub fn prev_header(&self) -> &HoloHash<Header>
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 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<'arbitrary> Arbitrary<'arbitrary> for EntryCreationHeader
impl<'arbitrary> Arbitrary<'arbitrary> for EntryCreationHeader
sourcefn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<EntryCreationHeader, Error>
fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<EntryCreationHeader, Error>
Generate an arbitrary value of Self
from the given unstructured data. Read more
sourcefn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<EntryCreationHeader, Error>
fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<EntryCreationHeader, Error>
Generate an arbitrary value of Self
from the entirety of the given unstructured data. Read more
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<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
sourceimpl From<Create> for EntryCreationHeader
impl From<Create> for EntryCreationHeader
sourcefn from(c: Create) -> EntryCreationHeader
fn from(c: Create) -> EntryCreationHeader
Converts to this type from the input type.
sourceimpl From<EntryCreationHeader> for Header
impl From<EntryCreationHeader> for Header
sourcefn from(e: EntryCreationHeader) -> Header
fn from(e: EntryCreationHeader) -> Header
Converts to this type from the input type.
sourceimpl From<Update> for EntryCreationHeader
impl From<Update> for EntryCreationHeader
sourcefn from(u: Update) -> EntryCreationHeader
fn from(u: Update) -> EntryCreationHeader
Converts to this type from the input type.
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 hash_type(&self) -> <EntryCreationHeader as HashableContent>::HashType
fn hash_type(&self) -> <EntryCreationHeader as HashableContent>::HashType
The HashType which this content will be hashed to
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
sourcefn 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
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
type Error = WrongHeaderError
type Error = WrongHeaderError
The type returned in the event of a conversion error.
sourcefn 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.
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, C> HashableContentExtSync<T> for C where
T: HashTypeSync,
C: HashableContent<HashType = T>,
impl<T, C> HashableContentExtSync<T> for C where
T: HashTypeSync,
C: HashableContent<HashType = T>,
sourcefn into_hashed(self) -> HoloHashed<C>
fn into_hashed(self) -> HoloHashed<C>
Move into a HoloHashed
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more