#[non_exhaustive]pub enum ServiceEvent<T: ServerTypes> {
Read {
peer_id: PeerId,
handle: Handle,
offset: u32,
responder: T::ReadResponder,
},
Write {
peer_id: PeerId,
handle: Handle,
offset: u32,
value: T::ServiceWriteType,
responder: T::WriteResponder,
},
ClientConfiguration {
peer_id: PeerId,
handle: Handle,
notification_type: NotificationType,
},
#[non_exhaustive]
PeerInfo {
peer_id: PeerId,
mtu: Option<u16>,
connected: Option<bool>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Read
Peer requests to read from a handle (characteritic or descriptor) at the given offset.
Write
Peer has written a value to a handle (characteristic or descriptor) at the given offset.
ClientConfiguration
Notification that a peer has configured a characteristic for indication or notification.
PeerInfo
Extra information about a peer is provided. This event may not be sent by all implementations.
Implementations§
Auto Trait Implementations§
impl<T> Freeze for ServiceEvent<T>where
<T as ServerTypes>::ReadResponder: Freeze,
<T as ServerTypes>::ServiceWriteType: Freeze,
<T as ServerTypes>::WriteResponder: Freeze,
impl<T> RefUnwindSafe for ServiceEvent<T>where
<T as ServerTypes>::ReadResponder: RefUnwindSafe,
<T as ServerTypes>::ServiceWriteType: RefUnwindSafe,
<T as ServerTypes>::WriteResponder: RefUnwindSafe,
impl<T> Send for ServiceEvent<T>where
<T as ServerTypes>::ReadResponder: Send,
<T as ServerTypes>::ServiceWriteType: Send,
<T as ServerTypes>::WriteResponder: Send,
impl<T> Sync for ServiceEvent<T>where
<T as ServerTypes>::ReadResponder: Sync,
<T as ServerTypes>::ServiceWriteType: Sync,
<T as ServerTypes>::WriteResponder: Sync,
impl<T> Unpin for ServiceEvent<T>where
<T as ServerTypes>::ReadResponder: Unpin,
<T as ServerTypes>::ServiceWriteType: Unpin,
<T as ServerTypes>::WriteResponder: Unpin,
impl<T> UnwindSafe for ServiceEvent<T>where
<T as ServerTypes>::ReadResponder: UnwindSafe,
<T as ServerTypes>::ServiceWriteType: UnwindSafe,
<T as ServerTypes>::WriteResponder: UnwindSafe,
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