pub(crate) enum ForwardError {
Transient(String),
Fatal(String),
}Expand description
Phase B.6 (post-fix) — forward an open_new_window request to
the already-running host and let this launcher exit 0.
The host writes <data-dir>/ipc-port after CEF init as
port:token. We open a TCP connection to 127.0.0.1:port, send a
minimal HTTP/1.1 POST to /ipc with the bearer token and a JSON
body, and bail. We deliberately do NOT pull in reqwest: the
launcher binary should stay tiny (~325 KB) and the protocol is
fixed, so a hand-rolled request is the right tool.
Failure classification (codex P2 PR #598):
Transient— port file missing / unreadable / malformed. The host is alive (pipe held) but mid-startup; caller exits 0 silently so the user isn’t punished for double-clicking quickly.Fatal— port file is readable, but the HTTP path failed (connect refused, write failed, timeout). Either a hung host or a non-running-instance source ofERROR_ACCESS_DENIED(namespace conflict, security descriptor failure). Caller surfaces the dialog so the user sees a real problem rather than a silent no-op.
Variants§
Auto Trait Implementations§
impl Freeze for ForwardError
impl RefUnwindSafe for ForwardError
impl Send for ForwardError
impl Sync for ForwardError
impl Unpin for ForwardError
impl UnwindSafe for ForwardError
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