pub struct Connection(/* private fields */);Implementations§
source§impl Connection
impl Connection
sourcepub fn sync(&self, version: u32) -> Callback
pub fn sync(&self, version: u32) -> Callback
The sync request asks the EIS implementation to emit the ‘done’ event
on the returned ei_callback object. Since requests are
handled in-order and events are delivered in-order, this can
be used as a synchronization point to ensure all previous requests and the
resulting events have been handled.
The object returned by this request will be destroyed by the EIS implementation after the callback is fired and as such the client must not attempt to use it after that point.
The callback_data in the ei_callback.done event is always zero.
Note that for a client to use this request it must announce
support for the “ei_callback” interface in ei_handshake.interface_version.
It is a protocol violation to request sync without having announced the
“ei_callback” interface and the EIS implementation must disconnect
the client.
sourcepub fn disconnect(&self)
pub fn disconnect(&self)
A request to the EIS implementation that this client should be disconnected. This is a courtesy request to allow the EIS implementation to distinquish between a client disconnecting on purpose and one disconnecting through the socket becoming invalid.
Immediately after sending this request, the client may destroy the
ei_connection object and it should close the socket. The EIS implementation
will treat the connection as already disconnected on receipt and does not
send the ei_connection.disconnect event in response to this request.
Trait Implementations§
source§impl Clone for Connection
impl Clone for Connection
source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Connection
impl Debug for Connection
source§impl Hash for Connection
impl Hash for Connection
source§impl PartialEq for Connection
impl PartialEq for Connection
impl Eq for Connection
impl StructuralPartialEq for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)