pub trait CodeReceiver {
// Required methods
fn bind(&self, port: Option<u16>) -> Result<u16>;
fn await_query(&self) -> Result<String>;
}Expand description
Capture the loopback redirect (auth §7.2, §10.1). bind binds the listener on
127.0.0.1 at the requested port (None ⇒ an OS-assigned ephemeral port, RFC
8252 §7.3) and returns the ACTUALLY-bound port, which browser_flow substitutes
into the redirect_uri — single-sourcing the port through the receiver whether
fixed or ephemeral. await_query then blocks until the redirect arrives and
returns its raw code=…&state=… query, which parse_callback validates.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".