pub struct Descriptor<T: AsGatt + ?Sized> { /* private fields */ }Expand description
Characteristic descriptor handle.
Implementations§
Source§impl<T: AsGatt + ?Sized> Descriptor<T>
impl<T: AsGatt + ?Sized> Descriptor<T>
Sourcepub fn set<M: RawMutex, P: PacketPool, const AT: usize, const CN: usize>(
&self,
server: &AttributeServer<'_, M, P, AT, CN>,
value: &T,
) -> Result<(), Error>
pub fn set<M: RawMutex, P: PacketPool, const AT: usize, const CN: usize>( &self, server: &AttributeServer<'_, M, P, AT, CN>, value: &T, ) -> Result<(), Error>
Set the value of the descriptor in the provided attribute server.
Sourcepub fn get<M: RawMutex, P: PacketPool, const AT: usize, const CN: usize>(
&self,
server: &AttributeServer<'_, M, P, AT, CN>,
) -> Result<T, Error>where
T: FromGatt,
pub fn get<M: RawMutex, P: PacketPool, const AT: usize, const CN: usize>(
&self,
server: &AttributeServer<'_, M, P, AT, CN>,
) -> Result<T, Error>where
T: FromGatt,
Read the value of the descriptor.
If the descriptor for the handle cannot be found, an error is returned.
Trait Implementations§
Source§impl<T: AsGatt + ?Sized> AttributeHandle for Descriptor<T>
impl<T: AsGatt + ?Sized> AttributeHandle for Descriptor<T>
Source§impl<T: Clone + AsGatt + ?Sized> Clone for Descriptor<T>
impl<T: Clone + AsGatt + ?Sized> Clone for Descriptor<T>
Source§fn clone(&self) -> Descriptor<T>
fn clone(&self) -> Descriptor<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy + AsGatt + ?Sized> Copy for Descriptor<T>
Auto Trait Implementations§
impl<T> Freeze for Descriptor<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Descriptor<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Descriptor<T>
impl<T> Sync for Descriptor<T>
impl<T> Unpin for Descriptor<T>
impl<T> UnwindSafe for Descriptor<T>where
T: UnwindSafe + ?Sized,
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