pub struct PendingDesktopContext { /* private fields */ }Expand description
A DesktopContext that is pending creation.
§Example
// Create a new window with a component that will be rendered in the new window.
let dom = VirtualDom::new(|| rsx!{ "popup!" });
// Create a new window asynchronously
let pending_context = dioxus::desktop::window().new_window(dom, Default::default());
// Wait for the context to be created
let window = pending_context.await;
// Now control the window
window.set_fullscreen(true);Implementations§
Source§impl PendingDesktopContext
impl PendingDesktopContext
Sourcepub async fn resolve(self) -> DesktopContext
pub async fn resolve(self) -> DesktopContext
Resolve the pending context into a DesktopContext.
Sourcepub async fn try_resolve(self) -> Result<DesktopContext, Canceled>
pub async fn try_resolve(self) -> Result<DesktopContext, Canceled>
Try to resolve the pending context into a DesktopContext.
Trait Implementations§
Source§impl IntoFuture for PendingDesktopContext
impl IntoFuture for PendingDesktopContext
Source§type Output = Rc<DesktopService>
type Output = Rc<DesktopService>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <PendingDesktopContext as IntoFuture>::Output>>>
type IntoFuture = Pin<Box<dyn Future<Output = <PendingDesktopContext as IntoFuture>::Output>>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl Freeze for PendingDesktopContext
impl !RefUnwindSafe for PendingDesktopContext
impl !Send for PendingDesktopContext
impl !Sync for PendingDesktopContext
impl Unpin for PendingDesktopContext
impl !UnwindSafe for PendingDesktopContext
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.