pub struct SlintContext(/* private fields */);
Expand description
This context is meant to hold the state and the backend. Currently it is not possible to have several platform at the same time in one process, but in the future it might be. See issue #4294
Implementations§
Source§impl SlintContext
impl SlintContext
Sourcepub fn new(platform: Box<dyn Platform + 'static>) -> Self
pub fn new(platform: Box<dyn Platform + 'static>) -> Self
Create a new context with a given platform
Sourcepub fn event_loop_proxy(&self) -> Option<Box<dyn EventLoopProxy>>
pub fn event_loop_proxy(&self) -> Option<Box<dyn EventLoopProxy>>
Return an event proxy
Sourcepub fn spawn_local<F: Future + 'static>(
&self,
fut: F,
) -> Result<JoinHandle<F::Output>, EventLoopError>
pub fn spawn_local<F: Future + 'static>( &self, fut: F, ) -> Result<JoinHandle<F::Output>, EventLoopError>
Context specific version of slint::spawn_local
pub fn run_event_loop(&self) -> Result<(), PlatformError>
pub fn set_xdg_app_id(&self, _app_id: SharedString)
pub fn xdg_app_id(&self) -> Option<SharedString>
Trait Implementations§
Source§impl Clone for SlintContext
impl Clone for SlintContext
Source§fn clone(&self) -> SlintContext
fn clone(&self) -> SlintContext
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SlintContext
impl !RefUnwindSafe for SlintContext
impl !Send for SlintContext
impl !Sync for SlintContext
impl Unpin for SlintContext
impl !UnwindSafe for SlintContext
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