pub struct Program<'info, P: ProgramId> { /* private fields */ }Expand description
Account that must be a named program. P: ProgramId identifies
which program the account’s address must equal.
ⓘ
pub system_program: Program<'info, SystemId>,Implementations§
Source§impl<'info, P: ProgramId> Program<'info, P>
impl<'info, P: ProgramId> Program<'info, P>
Sourcepub fn try_new(view: &'info AccountView) -> Result<Self, ProgramError>
pub fn try_new(view: &'info AccountView) -> Result<Self, ProgramError>
Wrap with address-pin and executable-flag verification.
pub fn as_account(&self) -> &'info AccountView
Trait Implementations§
impl<'info, P: ProgramId> Copy for Program<'info, P>
Auto Trait Implementations§
impl<'info, P> Freeze for Program<'info, P>
impl<'info, P> RefUnwindSafe for Program<'info, P>where
P: RefUnwindSafe,
impl<'info, P> Send for Program<'info, P>where
P: Send,
impl<'info, P> Sync for Program<'info, P>where
P: Sync,
impl<'info, P> Unpin for Program<'info, P>where
P: Unpin,
impl<'info, P> UnsafeUnpin for Program<'info, P>
impl<'info, P> UnwindSafe for Program<'info, P>where
P: UnwindSafe,
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