Enum hdi::prelude::op::EntryCreationAction
source · pub enum EntryCreationAction {
Create(Create<EntryRateWeight>),
Update(Update<EntryRateWeight>),
}
Expand description
Either a Action::Create
or a Action::Update
.
These actions both create a new instance of an Entry
.
Variants
Create(Create<EntryRateWeight>)
A Action::Create
that creates a new instance of an Entry
.
Update(Update<EntryRateWeight>)
A Action::Update
that creates a new instance of an Entry
.
Implementations
sourceimpl EntryCreationAction
impl EntryCreationAction
The author of this action.
sourcepub fn action_seq(&self) -> &u32
pub fn action_seq(&self) -> &u32
The action sequence number of this action.
sourcepub fn prev_action(&self) -> &HoloHash<Action>
pub fn prev_action(&self) -> &HoloHash<Action>
The previous ActionHash
of the previous action 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 action 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 action 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 action creates an EntryType::CapGrant
Entry
.
sourcepub fn action_type(&self) -> ActionType
pub fn action_type(&self) -> ActionType
Get the ActionType
for this.
Trait Implementations
sourceimpl Clone for EntryCreationAction
impl Clone for EntryCreationAction
sourcefn clone(&self) -> EntryCreationAction
fn clone(&self) -> EntryCreationAction
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for EntryCreationAction
impl Debug for EntryCreationAction
sourceimpl<'de> Deserialize<'de> for EntryCreationAction
impl<'de> Deserialize<'de> for EntryCreationAction
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<EntryCreationAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EntryCreationAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
sourceimpl From<Create<EntryRateWeight>> for EntryCreationAction
impl From<Create<EntryRateWeight>> for EntryCreationAction
sourcefn from(c: Create<EntryRateWeight>) -> EntryCreationAction
fn from(c: Create<EntryRateWeight>) -> EntryCreationAction
sourceimpl From<EntryCreationAction> for Action
impl From<EntryCreationAction> for Action
sourcefn from(e: EntryCreationAction) -> Action
fn from(e: EntryCreationAction) -> Action
sourceimpl From<Update<EntryRateWeight>> for EntryCreationAction
impl From<Update<EntryRateWeight>> for EntryCreationAction
sourcefn from(u: Update<EntryRateWeight>) -> EntryCreationAction
fn from(u: Update<EntryRateWeight>) -> EntryCreationAction
sourceimpl HashableContent for EntryCreationAction
impl HashableContent for EntryCreationAction
Allows a EntryCreationAction
to hash the same bytes as
the equivalent Action
variant without needing to clone the action.