HostCommand

Enum HostCommand 

Source
pub enum HostCommand {
Show 26 variants EnqueuePendingWindowCreation { entry: PendingWindowCreation, }, DequeuePendingWindowCreation, EnqueueBrowserPaneCreate { block_id: String, label: String, }, TryRegisterBrowserPaneLive { block_id: String, }, CompleteBrowserPaneCreate { block_id: String, }, EnqueueBrowserPaneClose { block_id: String, }, CompleteBrowserPaneClose { block_id: String, }, DrainBrowserPaneByLabel { label: String, }, AbortBrowserPaneCreate { block_id: String, reason: String, }, RegisterBrowser { label: String, browser: Browser, kind: BrowserKind, }, UnregisterBrowser { label: String, }, StartDrag { session: DragSession, }, EndDrag { drag_id: String, outcome: DragOutcome, }, PoolWindowSpawnStart { label: String, }, PoolWindowReady { label: String, }, PoolWindowDestroyedBeforePromote { label: String, }, PromotePoolWindow { label: String, }, PopAndPromoteFrontPoolWindow, PoolDrainAll, BeginDrain { reason: QuitReason, }, ConfirmDrained, EnqueueTopLevelWindow { request: TopLevelCreationRequest, }, TopLevelCallbackFired { label: String, }, TopLevelRendererTerminated { label: String, status: String, }, TopLevelExternallyClosed { label: String, }, SetWindowOpacity { label: String, opacity: f32, },
}
Expand description

Commands handled by the host reducer.

Manual Debug impl below because RegisterBrowser carries a cef::Browser which doesn’t impl Debug.

Variants§

§

EnqueuePendingWindowCreation

Append a pending-window-creation handoff. Producer side of the pending_window_creations queue (replaces the four direct state.pending_window_creations.lock().push_back(...) sites).

§

DequeuePendingWindowCreation

Pop the head of pending_window_creations. Returns the popped entry via HostEvent::PendingWindowDequeued, or HostEvent::PendingWindowQueueEmpty if the queue was empty. Consumer side of the queue (replaces client.rs::on_after_created’s direct pop_front).

§

EnqueueBrowserPaneCreate

Caller (pane create code) requests a new pane lifecycle entry. Reducer inserts with Live. Reject if block_id already present.

Fields

§block_id: String
§label: String
§

TryRegisterBrowserPaneLive

PR #5 — sole pane registration entry point post-H.1.d.

Replaces pane::lifecycle::PaneStateMachine::try_register_live. Reducer generates the label internally (via next_browser_pane_label) so label assignment is atomic with the entry insert. Returns the outcome via DispatchOutput::browser_pane_register_result:

  • Fresh(label): new Live entry inserted; caller posts CreateBrowserPaneTask
  • AlreadyLive(label): caller should re-navigate existing browser
  • Closing: caller must reject (old teardown still in flight)

Fields

§block_id: String
§

CompleteBrowserPaneCreate

CEF on_after_created fired for a pane browser; confirm it’s Live. No-op if already Live or absent (idempotent against late callbacks).

Fields

§block_id: String
§

EnqueueBrowserPaneClose

Caller requests pane close. Reducer flips entry to Closing and returns the entry’s label via DispatchOutput::closed_browser_pane_label iff the transition actually fired (was Live). Returns None for missing or already-Closing entries (idempotent).

Fields

§block_id: String
§

CompleteBrowserPaneClose

CEF on_before_close fired for a pane; remove entry from map.

Fields

§block_id: String
§

DrainBrowserPaneByLabel

PR #5 — sole label-keyed drain entry point post-H.1.d.

Replaces pane::lifecycle::PaneStateMachine::drain_by_label. Used by BrowserPaneManager::drain_closed_label when CEF’s on_before_close fires for a pane. Removes the entry whose label matches; returns the drained block_id via DispatchOutput::drained_browser_pane_block_id so the caller can also dispatch any block_id-keyed cleanup. Idempotent (None if no match).

Fields

§label: String
§

AbortBrowserPaneCreate

Pane creation failed before reaching Live (e.g., CEF callback never fired, browser host returned 0). Reducer removes entry.

Fields

§block_id: String
§reason: String
§

RegisterBrowser

Insert browser into browsers map. Caller is on the CEF UI thread (e.g., client.rs::on_after_created). Reject (with Error) if label already present (collision indicates a bug).

Fields

§label: String
§browser: Browser
§

UnregisterBrowser

Remove browser from browsers map. Idempotent; no-op if absent.

Fields

§label: String
§

StartDrag

Begin a cross-window drag session. Reject if one is already active (singleton invariant).

Fields

§session: DragSession
§

EndDrag

End the active drag. drag_id must match the current session.

Fields

§drag_id: String
§outcome: DragOutcome
§

PoolWindowSpawnStart

Pool window spawn started. Adds label to unpromoted set; sets respawn_in_flight = true if not already.

Fields

§label: String
§

PoolWindowReady

Frontend signaled the pool window’s renderer is fully initialized. Move from unpromoted to queue; clear respawn_in_flight.

Fields

§label: String
§

PoolWindowDestroyedBeforePromote

Pool window was destroyed before renderer-ready (e.g., user closed it externally during pre-warm). Remove from unpromoted, clear respawn_in_flight. Reducer may emit a refill effect.

Fields

§label: String
§

PromotePoolWindow

Promote a pool window into a user-visible top-level. Removes from queue and unpromoted, marks the corresponding BrowserHandle as is_pool: false.

Fields

§label: String
§

PopAndPromoteFrontPoolWindow

PR #5 H.4 — atomic pop+promote front of pool queue. Returns the popped label via DispatchOutput::promoted_pool_label, or None if the queue is empty. Replaces the legacy state.window_pool.lock().pop_front() + state.unpromoted_pool_labels.lock().remove pair in promote_pool_window.

§

PoolDrainAll

Drain all pool windows on shutdown. Idempotent.

§

BeginDrain

Transition Running → Draining. Suppresses pool refills, awaits drain completion.

Fields

§reason: QuitReason
§

ConfirmDrained

All drainable resources are gone (pool empty, browsers empty). Transition Draining → Quit.

§

EnqueueTopLevelWindow

Caller requests a top-level window. Reducer either:

  • rejects (User-initiated + busy) with Error; caller propagates visible error to frontend.
  • queues (Background) for later auto-advance.
  • starts immediately (idle slot) and emits Effect::PostCreateWindow.
§

TopLevelCallbackFired

CEF on_after_created fired for label. If matches in-flight, mark Completed and advance queue. If doesn’t match (orphan from stale state), emit Effect::CloseOrphanBrowser.

Fields

§label: String
§

TopLevelRendererTerminated

CEF on_render_process_terminated fired for the renderer process associated with label. If matches in-flight, mark Failed and advance queue.

Fields

§label: String
§status: String
§

TopLevelExternallyClosed

CEF on_before_close fired for label while still in-flight. User or external code closed the window mid-creation. Mark Failed.

Fields

§label: String
§

SetWindowOpacity

Set per-window opacity. Reducer stores the clamped value in window_opacities; the IPC handler applies the Win32 side-effect after host_dispatch returns (pure reducer, no I/O inside).

Fields

§label: String
§opacity: f32

Trait Implementations§

Source§

impl Clone for HostCommand

Source§

fn clone(&self) -> HostCommand

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T, U> ConvertParam<U> for T
where T: Into<U>,

§

fn into_raw(self) -> U

§

impl<T, U> ConvertReturnValue<U> for T
where T: Into<U>,

§

fn wrap_result(self) -> U

§

impl<T> Downcast for T
where T: 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.
§

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.
§

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.
§

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.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,