pub struct Runtime { /* private fields */ }
Implementations§
Source§impl Runtime
impl Runtime
pub fn new(egui_ctx: &Context, events: Option<ApplicationEventsChannel>) -> Self
pub fn bind(&self, service: Arc<dyn Service>)
pub fn uptime(&self) -> Duration
pub fn start_services(&self)
pub fn services(&self) -> Vec<Arc<dyn Service>>
pub fn stop_services(&self)
pub async fn join_services(&self)
pub fn drop(&self)
pub fn start(&self)
pub fn repaint_service(&self) -> &Arc<RepaintService>
Sourcepub fn events(&self) -> &ApplicationEventsChannel
pub fn events(&self) -> &ApplicationEventsChannel
Returns the reference to the application events channel.
Sourcepub async fn send<T>(&self, msg: T) -> Result<()>
pub async fn send<T>(&self, msg: T) -> Result<()>
Send an application even to the UI asynchronously.
pub async fn send_runtime_event(&self, msg: RuntimeEvent) -> Result<()>
Sourcepub fn try_send<T>(&self, msg: T) -> Result<()>
pub fn try_send<T>(&self, msg: T) -> Result<()>
Send an application event to the UI synchronously.
pub fn try_send_runtime_event(&self, msg: RuntimeEvent) -> Result<()>
pub fn spawn_task<F>(&self, task: F)
pub fn spawn_task_with_result<R, F>( &self, payload: &Payload<Result<R, Error>>, task: F, )
pub fn egui_ctx(&self) -> &Context
pub fn request_repaint(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.