Enum hdk::prelude::EntryCreationAction
[−]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
impl EntryCreationAction
impl EntryCreationAction
The author of this action.
pub fn action_seq(&self) -> &u32
pub fn action_seq(&self) -> &u32
The action sequence number of this action.
pub fn prev_action(&self) -> &HoloHash<Action>
pub fn prev_action(&self) -> &HoloHash<Action>
The previous ActionHash
of the previous action 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 action 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 action 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 action creates an EntryType::CapGrant
Entry
.
pub fn action_type(&self) -> ActionType
pub fn action_type(&self) -> ActionType
Get the ActionType
for this.
Trait Implementations
impl Clone for EntryCreationAction
impl Clone for EntryCreationAction
fn clone(&self) -> EntryCreationAction
fn clone(&self) -> EntryCreationAction
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 EntryCreationAction
impl Debug for EntryCreationAction
impl<'de> Deserialize<'de> for EntryCreationAction
impl<'de> Deserialize<'de> for EntryCreationAction
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>,
Deserialize this value from the given Serde deserializer. Read more
impl From<Create<EntryRateWeight>> for EntryCreationAction
impl From<Create<EntryRateWeight>> for EntryCreationAction
fn from(c: Create<EntryRateWeight>) -> EntryCreationAction
fn from(c: Create<EntryRateWeight>) -> EntryCreationAction
Converts to this type from the input type.
impl From<EntryCreationAction> for Action
impl From<EntryCreationAction> for Action
fn from(e: EntryCreationAction) -> Action
fn from(e: EntryCreationAction) -> Action
Converts to this type from the input type.
impl From<Update<EntryRateWeight>> for EntryCreationAction
impl From<Update<EntryRateWeight>> for EntryCreationAction
fn from(u: Update<EntryRateWeight>) -> EntryCreationAction
fn from(u: Update<EntryRateWeight>) -> EntryCreationAction
Converts to this type from the input type.
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.
fn hash_type(&self) -> <EntryCreationAction as HashableContent>::HashType
fn hash_type(&self) -> <EntryCreationAction 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<EntryCreationAction> for EntryCreationAction
impl PartialEq<EntryCreationAction> for EntryCreationAction
fn eq(&self, other: &EntryCreationAction) -> bool
fn eq(&self, other: &EntryCreationAction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Serialize for EntryCreationAction
impl Serialize for EntryCreationAction
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<&EntryCreationAction> for SerializedBytes
impl TryFrom<&EntryCreationAction> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(
t: &EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: &EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
impl TryFrom<Action> for EntryCreationAction
impl TryFrom<Action> for EntryCreationAction
type Error = WrongActionError
type Error = WrongActionError
The type returned in the event of a conversion error.
fn try_from(
value: Action
) -> Result<EntryCreationAction, <EntryCreationAction as TryFrom<Action>>::Error>
fn try_from(
value: Action
) -> Result<EntryCreationAction, <EntryCreationAction as TryFrom<Action>>::Error>
Performs the conversion.
impl TryFrom<EntryCreationAction> for SerializedBytes
impl TryFrom<EntryCreationAction> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(
t: EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: EntryCreationAction
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
impl TryFrom<SerializedBytes> for EntryCreationAction
impl TryFrom<SerializedBytes> for EntryCreationAction
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(
sb: SerializedBytes
) -> Result<EntryCreationAction, SerializedBytesError>
fn try_from(
sb: SerializedBytes
) -> Result<EntryCreationAction, SerializedBytesError>
Performs the conversion.
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 = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
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>
Deserializes using the given deserializer
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> 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