pub struct NonDelegateAction(/* private fields */);Expand description
Non-delegate action (for use within DelegateAction).
This is a newtype wrapper around Action that ensures the wrapped action is not a Delegate variant, since delegate actions cannot contain nested delegate actions.
The newtype wrapper serializes identically to the inner Action, preserving Borsh compatibility with near-primitives.
Implementations§
Source§impl NonDelegateAction
impl NonDelegateAction
Sourcepub fn from_action(action: Action) -> Option<Self>
pub fn from_action(action: Action) -> Option<Self>
Convert from an Action, returning None if it’s a Delegate action.
Sourcepub fn into_inner(self) -> Action
pub fn into_inner(self) -> Action
Consume self and return the inner action.
Trait Implementations§
Source§impl BorshDeserialize for NonDelegateAction
impl BorshDeserialize for NonDelegateAction
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for NonDelegateAction
impl BorshSerialize for NonDelegateAction
Source§impl Clone for NonDelegateAction
impl Clone for NonDelegateAction
Source§fn clone(&self) -> NonDelegateAction
fn clone(&self) -> NonDelegateAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NonDelegateAction
impl Debug for NonDelegateAction
Source§impl From<NonDelegateAction> for Action
impl From<NonDelegateAction> for Action
Source§fn from(action: NonDelegateAction) -> Self
fn from(action: NonDelegateAction) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NonDelegateAction
impl PartialEq for NonDelegateAction
Source§impl TryFrom<Action> for NonDelegateAction
impl TryFrom<Action> for NonDelegateAction
impl Eq for NonDelegateAction
impl StructuralPartialEq for NonDelegateAction
Auto Trait Implementations§
impl Freeze for NonDelegateAction
impl RefUnwindSafe for NonDelegateAction
impl Send for NonDelegateAction
impl Sync for NonDelegateAction
impl Unpin for NonDelegateAction
impl UnsafeUnpin for NonDelegateAction
impl UnwindSafe for NonDelegateAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.