Struct rustun::client::BaseClient
[−]
[src]
pub struct BaseClient<T> { /* fields omitted */ }
A Client trait implementation which can be used as base of other implementations.
This uses T
as the message transport layer.
Methods
impl<T> BaseClient<T> where
T: Transport + Send + 'static,
[src]
T: Transport + Send + 'static,
fn new<S: Spawn>(spawner: &S, server: SocketAddr, transport: T) -> Self
Makes a new BaseClient
instance which communicates with server
.
fn set_request_timeout(&mut self, timeout: Duration)
Sets the timeout duration of a request transaction.
The default value is DEFAULT_TIMEOUT_MS.
Trait Implementations
impl<T: Debug> Debug for BaseClient<T>
[src]
impl<T: Transport> Client for BaseClient<T>
[src]
type CallRaw = BaseCallRaw
Future
type to handle a request/response transaction using RawMessage
.
type CastRaw = BaseCastRaw
Future
type to handle a indication transaction using RawMessage
.
fn call_raw(&mut self, message: RawMessage) -> Self::CallRaw
Makes a Future
that sends the raw request message to a server and waits the response from it. Read more
fn cast_raw(&mut self, message: RawMessage) -> Self::CastRaw
Makes a Future
that sends the raw indication message to a server.
fn call<M, A>(&mut self, message: Request<M, A>) -> Call<M, A, Self::CallRaw> where
M: Method,
A: Attribute,
M: Method,
A: Attribute,
Makes a Future
that sends the request message to a server and waits the response from it. Read more
fn cast<M, A>(&mut self, message: Indication<M, A>) -> Cast<Self::CastRaw> where
M: Method,
A: Attribute,
M: Method,
A: Attribute,
Makes a Future
that sends the indication message to a server.