axum_test::transport_layer

Trait TransportLayer

Source
pub trait TransportLayer:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn send<'a>(
        &'a self,
        request: Request<Body>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + 'a>>;
    fn transport_layer_type(&self) -> TransportLayerType;
    fn is_running(&self) -> bool;

    // Provided method
    fn url(&self) -> Option<&Url> { ... }
}

Required Methods§

Source

fn send<'a>( &'a self, request: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + 'a>>

Source

fn transport_layer_type(&self) -> TransportLayerType

Source

fn is_running(&self) -> bool

Provided Methods§

Source

fn url(&self) -> Option<&Url>

Implementors§