Struct GattData

Source
pub struct GattData<'stack, P: PacketPool> { /* private fields */ }
Expand description

A GATT payload ready for processing.

Implementations§

Source§

impl<'stack, P: PacketPool> GattData<'stack, P>

Source

pub fn handle(&self) -> Option<u16>

Return the characteristic handle that this GATT request is related to, if applicable.

Returns None if the request is not related to a characteristic handle (e.g. a service discovery request).

Source

pub fn incoming(&self) -> AttClient<'_>

Get the raw incoming ATT PDU.

Source

pub async fn reply(self, rsp: AttRsp<'_>) -> Result<(), Error>

Respond directly to request.

Source

pub async fn send_unsolicited( connection: &Connection<'_, P>, uns: AttUns<'_>, ) -> Result<(), Error>

Send an unsolicited ATT PDU without having a request (e.g. notification or indication)

Auto Trait Implementations§

§

impl<'stack, P> Freeze for GattData<'stack, P>
where <P as PacketPool>::Packet: Freeze,

§

impl<'stack, P> !RefUnwindSafe for GattData<'stack, P>

§

impl<'stack, P> !Send for GattData<'stack, P>

§

impl<'stack, P> !Sync for GattData<'stack, P>

§

impl<'stack, P> Unpin for GattData<'stack, P>
where <P as PacketPool>::Packet: Unpin,

§

impl<'stack, P> !UnwindSafe for GattData<'stack, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.