pub trait Transport: Debug + Clone {
type Out: Future<Output = Result<Value>>;
// Required methods
fn prepare(&self, method: &str, params: Vec<Value>) -> (RequestId, Call);
fn send(
&self,
id: RequestId,
request: Call,
options: CallOptions,
) -> Self::Out;
// Provided methods
fn execute(
&self,
method: &str,
params: Vec<Value>,
options: CallOptions,
) -> Self::Out { ... }
fn set_max_response_bytes(&mut self, bytes: u64) { ... }
}
Expand description
Transport implementation
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn execute(
&self,
method: &str,
params: Vec<Value>,
options: CallOptions,
) -> Self::Out
fn execute( &self, method: &str, params: Vec<Value>, options: CallOptions, ) -> Self::Out
Execute remote method with given parameters.
Sourcefn set_max_response_bytes(&mut self, bytes: u64)
fn set_max_response_bytes(&mut self, bytes: u64)
set the max response bytes, do nothing by default
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.