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§
source§impl 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_def(&self) -> Option<&AppEntryDef>
pub fn app_entry_def(&self) -> Option<&AppEntryDef>
The AppEntryDef
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§
source§impl<'arbitrary> Arbitrary<'arbitrary> for EntryCreationAction
impl<'arbitrary> Arbitrary<'arbitrary> for EntryCreationAction
source§fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<EntryCreationAction, Error>
fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<EntryCreationAction, Error>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<EntryCreationAction, Error>
fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<EntryCreationAction, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for EntryCreationAction
impl Clone for EntryCreationAction
source§fn clone(&self) -> EntryCreationAction
fn clone(&self) -> EntryCreationAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EntryCreationAction
impl Debug for EntryCreationAction
source§impl<'de> Deserialize<'de> for EntryCreationAction
impl<'de> Deserialize<'de> for EntryCreationAction
source§fn 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>,
source§impl From<Create<EntryRateWeight>> for EntryCreationAction
impl From<Create<EntryRateWeight>> for EntryCreationAction
source§fn from(c: Create<EntryRateWeight>) -> EntryCreationAction
fn from(c: Create<EntryRateWeight>) -> EntryCreationAction
source§impl From<EntryCreationAction> for Action
impl From<EntryCreationAction> for Action
source§fn from(e: EntryCreationAction) -> Action
fn from(e: EntryCreationAction) -> Action
source§impl From<Update<EntryRateWeight>> for EntryCreationAction
impl From<Update<EntryRateWeight>> for EntryCreationAction
source§fn from(u: Update<EntryRateWeight>) -> EntryCreationAction
fn from(u: Update<EntryRateWeight>) -> EntryCreationAction
source§impl 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.
source§fn hash_type(&self) -> <EntryCreationAction as HashableContent>::HashType
fn hash_type(&self) -> <EntryCreationAction as HashableContent>::HashType
source§fn hashable_content(&self) -> HashableContentBytes
fn hashable_content(&self) -> HashableContentBytes
source§impl PartialEq<EntryCreationAction> for EntryCreationAction
impl PartialEq<EntryCreationAction> for EntryCreationAction
source§fn eq(&self, other: &EntryCreationAction) -> bool
fn eq(&self, other: &EntryCreationAction) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for EntryCreationAction
impl Serialize for EntryCreationAction
source§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,
source§impl TryFrom<&EntryCreationAction> for SerializedBytes
impl TryFrom<&EntryCreationAction> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(
t: &EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: &EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<Action> for EntryCreationAction
impl TryFrom<Action> for EntryCreationAction
§type Error = WrongActionError
type Error = WrongActionError
source§fn try_from(
value: Action
) -> Result<EntryCreationAction, <EntryCreationAction as TryFrom<Action>>::Error>
fn try_from(
value: Action
) -> Result<EntryCreationAction, <EntryCreationAction as TryFrom<Action>>::Error>
source§impl TryFrom<EntryCreationAction> for SerializedBytes
impl TryFrom<EntryCreationAction> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(
t: EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<SerializedBytes> for EntryCreationAction
impl TryFrom<SerializedBytes> for EntryCreationAction
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(
sb: SerializedBytes
) -> Result<EntryCreationAction, SerializedBytesError>
fn try_from(
sb: SerializedBytes
) -> Result<EntryCreationAction, SerializedBytesError>
impl Eq for EntryCreationAction
impl StructuralEq for EntryCreationAction
impl StructuralPartialEq for EntryCreationAction
Auto Trait Implementations§
impl RefUnwindSafe for EntryCreationAction
impl Send for EntryCreationAction
impl Sync for EntryCreationAction
impl Unpin for EntryCreationAction
impl UnwindSafe for EntryCreationAction
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T, C> HashableContentExtSync<T> for Cwhere
T: HashTypeSync,
C: HashableContent<HashType = T>,
impl<T, C> HashableContentExtSync<T> for Cwhere
T: HashTypeSync,
C: HashableContent<HashType = T>,
source§fn into_hashed(self) -> HoloHashed<C>
fn into_hashed(self) -> HoloHashed<C>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.