Thalweg · API reference ← Main docs

UcClient

Trait UcClient 

Source
pub trait UcClient: Send + Sync {
    // Required method
    fn send<'life0, 'async_trait>(
        &'life0 self,
        request: UcRequest,
    ) -> Pin<Box<dyn Future<Output = Result<UcResponse, UcHttpError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The transport seam. A backend performs HTTP by calling UcClient::send; the concrete implementation owns the workspace host, TLS, and connection pooling.

Required Methods§

Source

fn send<'life0, 'async_trait>( &'life0 self, request: UcRequest, ) -> Pin<Box<dyn Future<Output = Result<UcResponse, UcHttpError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform request and return the response.

§Errors

Returns UcHttpError on a transport-level failure (an HTTP error status is a successful return with a non-2xx UcResponse::status).

Implementors§