pub trait CtxWithHttp {
// Required method
fn http(&self) -> &HttpClient;
}Expand description
Contexts which can perform outgoing HTTP requests.
This type is useful for writing reusable logic which is generic over the context type, allowing it to be used from procedures and HTTP handlers.
When operating on a concrete-typed ProcedureContext
this trait is not necessary,
as the context’s http field provides the same access.
Required Methods§
fn http(&self) -> &HttpClient
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".