pub struct OtherEvent<'stack, 'server, P: PacketPool> { /* private fields */ }
Expand description
Other event returned while processing GATT requests (neither read, nor write).
Implementations§
Source§impl<'stack, P: PacketPool> OtherEvent<'stack, '_, P>
impl<'stack, P: PacketPool> OtherEvent<'stack, '_, P>
Sourcepub fn accept(self) -> Result<Reply<'stack, P>, Error>
pub fn accept(self) -> Result<Reply<'stack, P>, Error>
Accept the event, making it processed by the server.
Automatically called if drop() is invoked.
Sourcepub fn reject(self, err: AttErrorCode) -> Result<Reply<'stack, P>, Error>
pub fn reject(self, err: AttErrorCode) -> Result<Reply<'stack, P>, Error>
Reject the event with the provided error code, it will not be processed by the attribute server.
Sourcepub fn payload(&self) -> &GattData<'stack, P>
pub fn payload(&self) -> &GattData<'stack, P>
Get a reference to the underlying GattData
payload that this event is enclosing
Sourcepub fn into_payload(self) -> GattData<'stack, P>
pub fn into_payload(self) -> GattData<'stack, P>
Convert the event back into the GattData
payload it is enclosing
Allows for custom processing of the enclosed data, as in handling payloads which are not supported yet by the enclosed attribute server. Note that this will consume the event, so it would be up to the caller to respond to the incoming payload if needed and however they see fit.
Trait Implementations§
Source§impl<P: PacketPool> Drop for OtherEvent<'_, '_, P>
impl<P: PacketPool> Drop for OtherEvent<'_, '_, P>
Auto Trait Implementations§
impl<'stack, 'server, P> Freeze for OtherEvent<'stack, 'server, P>
impl<'stack, 'server, P> !RefUnwindSafe for OtherEvent<'stack, 'server, P>
impl<'stack, 'server, P> !Send for OtherEvent<'stack, 'server, P>
impl<'stack, 'server, P> !Sync for OtherEvent<'stack, 'server, P>
impl<'stack, 'server, P> Unpin for OtherEvent<'stack, 'server, P>
impl<'stack, 'server, P> !UnwindSafe for OtherEvent<'stack, 'server, P>
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