pub struct NodeMachine<T: TypedMachine> { /* private fields */ }Expand description
The machine behind an addon’s Machine class: a JsonMachine, the
machine compiled once per addon with the load options of this object.
Implementations§
Source§impl<T: TypedMachine> NodeMachine<T>
impl<T: TypedMachine> NodeMachine<T>
Sourcepub fn load(env: &Env, options: &str) -> Result<Self>
pub fn load(env: &Env, options: &str) -> Result<Self>
The compiled machine with the load
options of JsonMachine::load. A load that fails is an error whose
code is the contract’s: WORKFLOW_INVALID_INPUT of options that do
not parse, WORKFLOW_INVALID_MACHINE of a machine that does not
compile.
Sourcepub fn start(&self, env: &Env, options: &str, now: f64) -> Result<NodeActor<T>>
pub fn start(&self, env: &Env, options: &str, now: f64) -> Result<NodeActor<T>>
Starts an actor at now with the options of JsonMachine::start.
A start that fails is an error whose code is the contract’s,
WORKFLOW_MACHINE_FAILED of a root that failed as it started, and
whose message is the error’s.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for NodeMachine<T>
impl<T> !UnwindSafe for NodeMachine<T>
impl<T> Forget for NodeMachine<T>
impl<T> Freeze for NodeMachine<T>where
*const ArcInner<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>> is !null: Freeze,
PhantomData<ArcInner<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<String>: Freeze,
impl<T> Move for NodeMachine<T>
impl<T> Send for NodeMachine<T>where
Arc<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>>: Send,
RawTable<usize>: Send,
RawVecInner: Send,
impl<T> Sync for NodeMachine<T>where
Arc<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>>: Sync,
RawTable<usize>: Sync,
RawVecInner: Sync,
impl<T> Unpin for NodeMachine<T>where
Arc<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>>: Unpin,
*const u8 is !null: Unpin,
impl<T> UnsafeUnpin for NodeMachine<T>where
*const ArcInner<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Machine<<T as TypedMachine>::Context, <T as TypedMachine>::Event>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
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