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§
Implementations§
Auto Trait Implementations§
impl Freeze for ForwardError
impl RefUnwindSafe for ForwardError
impl Send for ForwardError
impl Sync for ForwardError
impl Unpin for ForwardError
impl UnsafeUnpin 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
§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>
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>
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)
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)
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.