INNER CODE UNIT · Rust
from
slowtec/tokio-modbus · src/client/mod.rs:120
fn from(client: Box<dyn Client>) -> Self {
Self { client }
}
}
impl From<Context> for Box<dyn Client> {
fn from(val: Context) -> Self {
val.client
}
}
#[async_trait]
impl Client for Context {
async fn call(&mut self, request: Request<'_>) -> Result<Response> {
self.client.call(request).await
}
async fn disconnect(&mut self) -> io::Result<()> {