ForwardError

Enum ForwardError 

Source
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 of ERROR_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§

§

Transient(String)

§

Fatal(String)

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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.

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