pub enum Event {
SessionError {
peer: SocketAddr,
error: String,
},
ProtocolWarning {
peer: SocketAddr,
device_id: Option<DeviceId>,
message_id: u32,
error: String,
},
Device(DeviceEvent),
}Expand description
Output emitted by the running server to its integration adapter.
The receiver returned by a server constructor is the sole event stream for
every accepted connection. Consumers should drain it continuously and use
the device ID carried by Event::Device rather than inferring ownership
from event order. They should also retain the generation from the latest
registration and reject later-delivered events from replaced sessions.
Variants§
SessionError
ProtocolWarning
A malformed non-registration message was discarded while the session remained usable.
Fields
§
peer: SocketAddrDevice(DeviceEvent)
Implementations§
Source§impl Event
impl Event
pub fn device( device_id: DeviceId, session_generation: SessionGeneration, event: DeviceEventKind, ) -> Self
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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
Mutably borrows from an owned value. Read more