pub struct Program { /* private fields */ }Expand description
A program pinned to a specific thread and ready to execute.
Implementations§
Source§impl Program
impl Program
pub fn thread_env(&self) -> ThreadEnv
Sourcepub fn data<T: Default + 'static>(&self) -> Rc<T>
pub fn data<T: Default + 'static>(&self) -> Rc<T>
Gets or creates shared typed data for this program instance.
pub fn has_section(&self, name: &str) -> bool
Sourcepub async fn run(
&self,
timeslice: &TimesliceConfig,
timeslicer: &impl Timeslicer,
entrypoint: &str,
resources: &mut [&mut dyn Any],
calldata: &[u8],
preemption: &PreemptionEnabled,
) -> Result<i64, Error>
pub async fn run( &self, timeslice: &TimesliceConfig, timeslicer: &impl Timeslicer, entrypoint: &str, resources: &mut [&mut dyn Any], calldata: &[u8], preemption: &PreemptionEnabled, ) -> Result<i64, Error>
Runs the program entrypoint with the provided resources and calldata.
Auto Trait Implementations§
impl !Freeze for Program
impl !RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl Unpin for Program
impl !UnwindSafe for Program
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