pub trait Transport {
type Error: Error + Send + Sync + 'static;
// Required method
fn request(
&self,
method: &str,
path: &str,
query: &[(&str, String)],
body: Option<Vec<u8>>,
) -> impl Future<Output = Result<(u16, Vec<u8>), Self::Error>> + Send;
}Expand description
What a generated method issues its request through.
It is declared here rather than imported: the half of this crate that reaches the network is hand-written and implements it, so neither half has to name what the other declares, and nothing here carries a socket.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".