pub struct PublishedCharacteristic { /* private fields */ }Expand description
A characteristic that is live in the local GATT database.
Implementations§
Source§impl PublishedCharacteristic
impl PublishedCharacteristic
pub fn uuid(&self) -> &BluetoothUuid
Sourcepub fn subscribers(&self) -> Vec<RemoteCentral>
pub fn subscribers(&self) -> Vec<RemoteCentral>
The centrals currently subscribed.
Tracked here rather than asked of Android, which keeps no such list.
Sourcepub fn try_notify(&self, value: &[u8]) -> bool
pub fn try_notify(&self, value: &[u8]) -> bool
Send a value to every subscriber without waiting.
false if any send was refused — Android takes one notification at a
time per connection and rejects the next until onNotificationSent.
Sourcepub fn try_notify_centrals(
&self,
value: &[u8],
centrals: &[RemoteCentral],
) -> bool
pub fn try_notify_centrals( &self, value: &[u8], centrals: &[RemoteCentral], ) -> bool
Send a value to specific subscribers without waiting.
Trait Implementations§
Source§impl Clone for PublishedCharacteristic
impl Clone for PublishedCharacteristic
Auto Trait Implementations§
impl Freeze for PublishedCharacteristic
impl RefUnwindSafe for PublishedCharacteristic
impl Send for PublishedCharacteristic
impl Sync for PublishedCharacteristic
impl Unpin for PublishedCharacteristic
impl UnsafeUnpin for PublishedCharacteristic
impl UnwindSafe for PublishedCharacteristic
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