Skip to main content

NinePWtHandler

Trait NinePWtHandler 

Source
pub trait NinePWtHandler: Send + Sync {
    // Required method
    fn serve<'life0, 'async_trait>(
        &'life0 self,
        stream: Box<dyn NinePWtStream>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Serves one 9P session over a WebTransport bidi stream (H1b / #765).

This is the injection seam that keeps the transport crate free of the 9P core: the concrete impl lives in the hyprstream crate (it owns the 9P Translator, the Subject-scoped export mount, and the mount-ticket validator), and is registered here via QuinnRpcServer::with_ninep_handler or the process-global set_global_ninep_handler — mirroring how the moq consumer is threaded onto the same endpoint. The mount ticket is validated at Tattach.uname inside the handler (the cert-pinned session carries no URL query), so this trait exposes only the raw byte stream.

Required Methods§

Source

fn serve<'life0, 'async_trait>( &'life0 self, stream: Box<dyn NinePWtStream>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Drive the 9P session on stream to completion (returns on EOF, the peer resetting the stream, or a fatal 9P framing error). The handler owns session teardown.

Implementors§