pub struct Client { /* private fields */ }Expand description
Client simulates “connection” to STUN server.
Trait Implementations§
Source§impl Protocol<TransportMessage<BytesMut>, Message, Event> for Client
impl Protocol<TransportMessage<BytesMut>, Message, Event> for Client
Source§fn poll_write(&mut self) -> Option<Self::Wout>
fn poll_write(&mut self) -> Option<Self::Wout>
Returns packets to transmit
It should be polled for transmit after:
- the application performed some I/O
- a call was made to
handle_read - a call was made to
handle_write - a call was made to
handle_timeout
Source§fn handle_read(&mut self, msg: TaggedBytesMut) -> Result<()>
fn handle_read(&mut self, msg: TaggedBytesMut) -> Result<()>
Handle an incoming read message. Read more
Source§fn handle_write(&mut self, m: Message) -> Result<()>
fn handle_write(&mut self, m: Message) -> Result<()>
Handle an outgoing write message. Read more
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more