Struct stremio_core::runtime::Runtime
source · pub struct Runtime<E: Env, M: Model<E>> {
model: Arc<RwLock<M>>,
tx: Sender<RuntimeEvent<E, M>>,
env: PhantomData<E>,
}
Fields§
§model: Arc<RwLock<M>>
§tx: Sender<RuntimeEvent<E, M>>
§env: PhantomData<E>
Implementations§
source§impl<E, M> Runtime<E, M>
impl<E, M> Runtime<E, M>
pub fn new( model: M, effects: Vec<Effect>, buffer: usize, ) -> (Self, Receiver<RuntimeEvent<E, M>>)
pub fn model(&self) -> LockResult<RwLockReadGuard<'_, M>>
pub fn dispatch(&self, action: RuntimeAction<E, M>)
fn emit(&self, event: RuntimeEvent<E, M>)
fn handle_effects(&self, effects: Vec<Effect>, fields: Vec<M::Field>)
fn handle_effect_output(&self, msg: Msg)
Trait Implementations§
Auto Trait Implementations§
impl<E, M> Freeze for Runtime<E, M>
impl<E, M> !RefUnwindSafe for Runtime<E, M>
impl<E, M> Send for Runtime<E, M>
impl<E, M> Sync for Runtime<E, M>
impl<E, M> Unpin for Runtime<E, M>where
E: Unpin,
impl<E, M> !UnwindSafe for Runtime<E, M>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)