pub struct NonDelegateAction(pub Action);
Expand description
This is Action which mustn’t contain DelegateAction.
This struct is needed to avoid the recursion when Action/DelegateAction is deserialized.
Important: Don’t make the inner Action public, this must only be constructed
through the correct interface that ensures the inner Action is actually not
a delegate action. That would break an assumption of this type, which we use
in several places. For example, borsh de-/serialization relies on it. If the
invariant is broken, we may end up with a Transaction
or Receipt
that we
can serialize but deserializing it back causes a parsing error.
JSON schema
{
"description": "This is Action which mustn't contain DelegateAction.\n\nThis struct is needed to avoid the recursion when Action/DelegateAction is deserialized.\n\nImportant: Don't make the inner Action public, this must only be constructed\nthrough the correct interface that ensures the inner Action is actually not\na delegate action. That would break an assumption of this type, which we use\nin several places. For example, borsh de-/serialization relies on it. If the\ninvariant is broken, we may end up with a `Transaction` or `Receipt` that we\ncan serialize but deserializing it back causes a parsing error.",
"allOf": [
{
"$ref": "#/components/schemas/Action"
}
]
}
Tuple Fields§
§0: Action
Trait Implementations§
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 Deref for NonDelegateAction
impl Deref for NonDelegateAction
Source§impl<'de> Deserialize<'de> for NonDelegateAction
impl<'de> Deserialize<'de> for NonDelegateAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&NonDelegateAction> for NonDelegateAction
impl From<&NonDelegateAction> for NonDelegateAction
Source§fn from(value: &NonDelegateAction) -> Self
fn from(value: &NonDelegateAction) -> Self
Converts to this type from the input type.
Source§impl From<Action> for NonDelegateAction
impl From<Action> for NonDelegateAction
Source§impl From<NonDelegateAction> for Action
impl From<NonDelegateAction> for Action
Source§fn from(value: NonDelegateAction) -> Self
fn from(value: NonDelegateAction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NonDelegateAction
impl RefUnwindSafe for NonDelegateAction
impl Send for NonDelegateAction
impl Sync for NonDelegateAction
impl Unpin 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