pub trait E2eTransport:
Clone
+ Send
+ Sync
+ 'static {
// Required methods
fn invoke<R>(
&self,
req: &R,
) -> impl Future<Output = Result<R::Return, E2eError>> + Send
where R: RemoteCall + Send + Sync;
fn invoke_on_dc<R>(
&self,
dc_id: i32,
req: &R,
) -> impl Future<Output = Result<R::Return, E2eError>> + Send
where R: RemoteCall + Send + Sync;
}Expand description
Minimal RPC surface the secret chat layer needs from a Telegram client.
Implementations must be cheap to clone (typically a handle around an Arc).
Failures are reported as E2eError::Transport.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".