pub struct ApplicationDocument<D: ScriptDocumentBackend>(/* private fields */);Expand description
A statically dispatched document wrapper with the backend’s layout and ownership.
Implementations§
Source§impl<D: ScriptDocumentBackend> ApplicationDocument<D>
impl<D: ScriptDocumentBackend> ApplicationDocument<D>
pub fn from_html(html: Arc<str>, config: DocumentConfig) -> Result<Self, String>
pub fn backend(&self) -> &D
pub fn backend_mut(&mut self) -> &mut D
pub fn into_backend(self) -> D
pub fn execute_scripts(&mut self) -> Result<(), String>
Source§impl<D: NativeHostDocumentBackend> ApplicationDocument<D>
impl<D: NativeHostDocumentBackend> ApplicationDocument<D>
Sourcepub fn attach_native_host(&mut self, host: D::Host) -> Result<(), String>
pub fn attach_native_host(&mut self, host: D::Host) -> Result<(), String>
Attaches the backend’s native host before script execution.
Ownership and failure cleanup follow NativeHostDocumentBackend.
Trait Implementations§
Source§impl<D: ScriptDocumentBackend> Document for ApplicationDocument<D>
impl<D: ScriptDocumentBackend> Document for ApplicationDocument<D>
fn inner(&self) -> DocGuard<'_>
fn inner_mut(&mut self) -> DocGuardMut<'_>
Source§fn handle_ui_event(&mut self, event: UiEvent)
fn handle_ui_event(&mut self, event: UiEvent)
Source§fn poll(&mut self, context: Option<Context<'_>>) -> bool
fn poll(&mut self, context: Option<Context<'_>>) -> bool
Poll any pending async operations, and flush changes to the underlying
BaseDocumentSource§fn poll_for_settle(
&mut self,
context: Option<Context<'_>>,
timers: bool,
) -> bool
fn poll_for_settle( &mut self, context: Option<Context<'_>>, timers: bool, ) -> bool
Drain immediate work for a host’s settle loop. Read more
Source§fn prepare_teardown(&mut self)
fn prepare_teardown(&mut self)
Revoke child work before ownership is dropped. Completion is separate.
fn dispose(self: Box<Self>) -> Arc<Teardown> ⓘ
fn set_page_visible(&mut self, visible: bool)
fn freeze(&mut self)
fn finish_restore(&mut self)
fn resume(&mut self)
Auto Trait Implementations§
impl<D> Forget for ApplicationDocument<D>
impl<D> Freeze for ApplicationDocument<D>where
D: Freeze,
impl<D> Move for ApplicationDocument<D>
impl<D> RefUnwindSafe for ApplicationDocument<D>where
D: RefUnwindSafe,
impl<D> Send for ApplicationDocument<D>where
D: Send,
impl<D> Sync for ApplicationDocument<D>where
D: Sync,
impl<D> Unpin for ApplicationDocument<D>where
D: Unpin,
impl<D> UnsafeUnpin for ApplicationDocument<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for ApplicationDocument<D>where
D: UnwindSafe,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert