pub struct Peripheral { /* private fields */ }Implementations§
Source§impl Peripheral
impl Peripheral
pub fn identifier(&self) -> Result<String, Error>
pub fn address(&self) -> Result<String, Error>
pub fn address_type(&self) -> Result<BluetoothAddressType, Error>
pub fn rssi(&self) -> Result<i16, Error>
pub fn tx_power(&self) -> Result<i16, Error>
pub fn mtu(&self) -> Result<u16, Error>
pub fn connect(&self) -> Result<(), Error>
pub fn disconnect(&self) -> Result<(), Error>
pub fn is_connected(&self) -> Result<bool, Error>
pub fn is_connectable(&self) -> Result<bool, Error>
pub fn is_paired(&self) -> Result<bool, Error>
pub fn unpair(&self) -> Result<(), Error>
pub fn services(&self) -> Result<Vec<Service>, Error>
pub fn manufacturer_data(&self) -> Result<HashMap<u16, Vec<u8>>, Error>
pub fn read( &self, service: &String, characteristic: &String, ) -> Result<Vec<u8>, Error>
pub fn write_request( &self, service: &String, characteristic: &String, data: &Vec<u8>, ) -> Result<(), Error>
pub fn write_command( &self, service: &String, characteristic: &String, data: &Vec<u8>, ) -> Result<(), Error>
pub fn notify( &self, service: &String, characteristic: &String, ) -> Result<impl Stream<Item = Result<ValueChangedEvent, Error>>, Error>
pub fn indicate( &self, service: &String, characteristic: &String, ) -> Result<impl Stream<Item = Result<ValueChangedEvent, Error>>, Error>
pub fn unsubscribe( &self, service: &String, characteristic: &String, ) -> Result<(), Error>
pub fn descriptor_read( &self, service: &String, characteristic: &String, descriptor: &String, ) -> Result<Vec<u8>, Error>
pub fn descriptor_write( &self, service: &String, characteristic: &String, descriptor: &String, data: &Vec<u8>, ) -> Result<(), Error>
pub fn on_connection_event( &self, ) -> impl Stream<Item = Result<ConnectionEvent, Error>>
Trait Implementations§
Source§impl Clone for Peripheral
impl Clone for Peripheral
Source§fn clone(&self) -> Peripheral
fn clone(&self) -> Peripheral
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 moreSource§impl From<Pin<Box<InnerPeripheral>>> for Peripheral
impl From<Pin<Box<InnerPeripheral>>> for Peripheral
impl Send for Peripheral
impl Sync for Peripheral
Auto Trait Implementations§
impl Freeze for Peripheral
impl RefUnwindSafe for Peripheral
impl Unpin for Peripheral
impl UnwindSafe for Peripheral
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