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\n This struct is needed to avoid the recursion when Action/DelegateAction is deserialized.\n\n Important: Don't make the inner Action public, this must only be constructed\n through the correct interface that ensures the inner Action is actually not\n a delegate action. That would break an assumption of this type, which we use\n in several places. For example, borsh de-/serialization relies on it. If the\n invariant is broken, we may end up with a `Transaction` or `Receipt` that we\n can serialize but deserializing it back causes a parsing error.",
"allOf": [
{
"$ref": "#/components/schemas/Action"
}
]
}Tuple Fields§
§0: ActionTrait 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§const fn clone_from(&mut self, source: &Self)
const 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<NonDelegateAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NonDelegateAction, <__D as Deserializer<'de>>::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) -> NonDelegateAction
fn from(value: &NonDelegateAction) -> NonDelegateAction
Converts to this type from the input type.
Source§impl From<Action> for NonDelegateAction
impl From<Action> for NonDelegateAction
Source§fn from(value: Action) -> NonDelegateAction
fn from(value: Action) -> NonDelegateAction
Converts to this type from the input type.
Source§impl From<NonDelegateAction> for Action
impl From<NonDelegateAction> for Action
Source§fn from(value: NonDelegateAction) -> Action
fn from(value: NonDelegateAction) -> Action
Converts to this type from the input type.
Source§impl Serialize for NonDelegateAction
impl Serialize for NonDelegateAction
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,
Serialize this value into the given Serde serializer. Read more
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