Trait rustun::client::Client
[−]
[src]
pub trait Client { type CallRaw: Future<Item=RawMessage, Error=Error>; type CastRaw: Future<Item=(), Error=Error>; fn call_raw(&mut self, message: RawMessage) -> Self::CallRaw; fn cast_raw(&mut self, message: RawMessage) -> Self::CastRaw; fn call<M, A>(&mut self,
message: Request<M, A>)
-> Call<M, A, Self::CallRaw> where M: Method, A: Attribute { ... } fn cast<M, A>(&mut self, message: Indication<M, A>) -> Cast<Self::CastRaw> where M: Method, A: Attribute { ... } }
STUN client.
Associated Types
type CallRaw: Future<Item=RawMessage, Error=Error>
Future
type to handle a request/response transaction using RawMessage
.
type CastRaw: Future<Item=(), Error=Error>
Future
type to handle a indication transaction using RawMessage
.
Required Methods
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.
fn cast_raw(&mut self, message: RawMessage) -> Self::CastRaw
Makes a Future
that sends the raw indication message to a server.
Provided Methods
fn call<M, A>(&mut self, message: Request<M, A>) -> Call<M, A, Self::CallRaw> where M: Method, A: Attribute
Makes a Future
that sends the request message to a server and
waits the response from it.
fn cast<M, A>(&mut self, message: Indication<M, A>) -> Cast<Self::CastRaw> where M: Method, A: Attribute
Makes a Future
that sends the indication message to a server.
Implementors
impl<T: Transport> Client for BaseClient<T>
impl Client for UdpClient
impl Client for TcpClient