Struct jet_margin::Invocation
source · [−]#[repr(transparent)]pub struct Invocation { /* private fields */ }
Expand description
Data made available to invoked programs by the margin program. Put data here if:
- adapters need a guarantee that the margin program is the actual source of the data, or
- the data is needed by functions defined in margin that are called by adapters Note: The security of the margin program cannot rely on function calls that happen within adapters, because adapters can falsify the arguments to those functions. Rather, this data should only be used to enable adapters to protect themselves, in which case it would be in their best interest to pass along the actual state from the margin account.
Implementations
sourceimpl Invocation
impl Invocation
sourcepub fn verify_directly_invoked(&self) -> Result<(), ErrorCode>
pub fn verify_directly_invoked(&self) -> Result<(), ErrorCode>
Returns ok if the current instruction was directly invoked by a cpi that marked the start.
sourcepub fn directly_invoked(&self) -> bool
pub fn directly_invoked(&self) -> bool
Returns true if the current instruction was directly invoked by a cpi that marked the start.
Trait Implementations
sourceimpl Clone for Invocation
impl Clone for Invocation
sourcefn clone(&self) -> Invocation
fn clone(&self) -> Invocation
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 moresourceimpl Debug for Invocation
impl Debug for Invocation
sourceimpl Default for Invocation
impl Default for Invocation
sourcefn default() -> Invocation
fn default() -> Invocation
Returns the “default value” for a type. Read more
sourceimpl Zeroable for Invocation
impl Zeroable for Invocation
impl Copy for Invocation
impl Pod for Invocation
Auto Trait Implementations
impl RefUnwindSafe for Invocation
impl Send for Invocation
impl Sync for Invocation
impl Unpin for Invocation
impl UnwindSafe for Invocation
Blanket Implementations
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<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
. Read more