pub struct DispatchOutput {
pub events: Vec<HostEvent>,
pub dequeued: Option<PendingWindowCreation>,
pub removed_browser: Option<Browser>,
pub browser_pane_register_result: Option<RegisterResult>,
pub closed_browser_pane_label: Option<String>,
pub drained_browser_pane_block_id: Option<String>,
pub ended_drag_session: Option<DragSession>,
pub pool_spawn_proceeding: bool,
pub pool_size_after: Option<usize>,
pub pool_destroyed_was_unpromoted: bool,
pub promoted_pool_label: Option<String>,
}Expand description
Output bundle returned from the reducer.
Most arms communicate via events alone, but several arms have callers
that need an atomic value-returning op alongside the state mutation:
-
DequeuePendingWindowCreation→dequeued: Option<PendingWindowCreation>(client.rs::on_after_createdneeds the popped entry’s fields to drivewindow_meta.insert+ReportWindowOpened). -
UnregisterBrowser→removed_browser: Option<Browser>(the close path inbrowser_panes::AppStateCloseOps::take_browser_hwndneeds the Browser handle to extract its HWND forDestroyWindow. The atomicity matters: see codex P2 PR #660 — separating get + dispatch creates a window where concurrent readers can also resolve the label and act on the closing handle). -
TryRegisterBrowserPaneLive→browser_pane_register_result: Option<RegisterResult>(PR #5 H.1.d:BrowserPaneManager::createbranches on Fresh/AlreadyLive/Closing). -
EnqueueBrowserPaneClose→closed_browser_pane_label: Option<String>(PR #5 H.1.d: the close path needs the label to calltake_browser_hwndwithout a separatelive_browser_pane_labelquery that could race). -
DrainBrowserPaneByLabel→drained_browser_pane_block_id: Option<String>(PR #5 H.1.d:drain_closed_labelneeds the block_id to dispatchCompleteBrowserPaneClose). -
EndDrag→ended_drag_session: Option<DragSession>(PR #5 H.3:complete_cross_drag/cancel_cross_dragneed the session payload to emit the renderer-side cross-drag-end event, AND need the .is_some() signal to distinguish actual end vs drag_id mismatch). -
PoolWindowSpawnStart→pool_spawn_proceeding: bool(PR #5 H.4: spawn_pool_window’s single-flight semaphore. true = slot acquired, caller proceeds with CEF spawn; false = suppressed (already in flight, or QuitState != Running)). -
PoolWindowReady/PoolWindowDestroyedBeforePromote/PopAndPromoteFrontPoolWindow→pool_size_after: Option<usize>(PR #5 H.4: caller checks against POOL_TARGET_SIZE to decide whether to trigger a refill). -
PoolWindowDestroyedBeforePromote→pool_destroyed_was_unpromoted: bool(PR #5 H.4: caller gates pool-inventory reports on this — the post-promote close path doesn’t own that update). -
PopAndPromoteFrontPoolWindow→promoted_pool_label: Option<String>(PR #5 H.4: caller needs the popped label to drive the CEF show + emit the pool:promote frontend event).
Default keeps the dispatch return type uniform across arms that don’t populate these fields.
Fields§
§events: Vec<HostEvent>§dequeued: Option<PendingWindowCreation>§removed_browser: Option<Browser>§browser_pane_register_result: Option<RegisterResult>§closed_browser_pane_label: Option<String>§drained_browser_pane_block_id: Option<String>§ended_drag_session: Option<DragSession>§pool_spawn_proceeding: bool§pool_size_after: Option<usize>§pool_destroyed_was_unpromoted: bool§promoted_pool_label: Option<String>Trait Implementations§
Source§impl Debug for DispatchOutput
impl Debug for DispatchOutput
Source§impl Default for DispatchOutput
impl Default for DispatchOutput
Source§fn default() -> DispatchOutput
fn default() -> DispatchOutput
Auto Trait Implementations§
impl Freeze for DispatchOutput
impl RefUnwindSafe for DispatchOutput
impl Send for DispatchOutput
impl Sync for DispatchOutput
impl Unpin for DispatchOutput
impl UnwindSafe for DispatchOutput
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
§impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
fn wrap_result(self) -> U
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.