Struct windows::Devices::Bluetooth::BluetoothDevice
pub struct BluetoothDevice(/* private fields */);
Implementations§
§impl BluetoothDevice
impl BluetoothDevice
pub fn DeviceId(&self) -> Result<HSTRING>
pub fn HostName(&self) -> Result<HostName>
pub fn Name(&self) -> Result<HSTRING>
pub fn ClassOfDevice(&self) -> Result<BluetoothClassOfDevice>
pub fn SdpRecords(&self) -> Result<IVectorView<IBuffer>>
pub fn RfcommServices(&self) -> Result<IVectorView<RfcommDeviceService>>
pub fn ConnectionStatus(&self) -> Result<BluetoothConnectionStatus>
pub fn BluetoothAddress(&self) -> Result<u64>
pub fn NameChanged<P0>(&self, handler: P0) -> Result<EventRegistrationToken>where
P0: Param<TypedEventHandler<BluetoothDevice, IInspectable>>,
pub fn RemoveNameChanged(&self, token: EventRegistrationToken) -> Result<()>
pub fn SdpRecordsChanged<P0>(
&self,
handler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<TypedEventHandler<BluetoothDevice, IInspectable>>,
pub fn RemoveSdpRecordsChanged( &self, token: EventRegistrationToken, ) -> Result<()>
pub fn ConnectionStatusChanged<P0>(
&self,
handler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<TypedEventHandler<BluetoothDevice, IInspectable>>,
pub fn RemoveConnectionStatusChanged( &self, token: EventRegistrationToken, ) -> Result<()>
pub fn DeviceInformation(&self) -> Result<DeviceInformation>
pub fn DeviceAccessInformation(&self) -> Result<DeviceAccessInformation>
pub fn RequestAccessAsync(&self) -> Result<IAsyncOperation<DeviceAccessStatus>>
pub fn GetRfcommServicesAsync( &self, ) -> Result<IAsyncOperation<RfcommDeviceServicesResult>>
pub fn GetRfcommServicesWithCacheModeAsync( &self, cachemode: BluetoothCacheMode, ) -> Result<IAsyncOperation<RfcommDeviceServicesResult>>
pub fn GetRfcommServicesForIdAsync<P0>(
&self,
serviceid: P0,
) -> Result<IAsyncOperation<RfcommDeviceServicesResult>>where
P0: Param<RfcommServiceId>,
pub fn GetRfcommServicesForIdWithCacheModeAsync<P0>(
&self,
serviceid: P0,
cachemode: BluetoothCacheMode,
) -> Result<IAsyncOperation<RfcommDeviceServicesResult>>where
P0: Param<RfcommServiceId>,
pub fn BluetoothDeviceId(&self) -> Result<BluetoothDeviceId>
pub fn WasSecureConnectionUsedForPairing(&self) -> Result<bool>
pub fn FromIdAsync( deviceid: &HSTRING, ) -> Result<IAsyncOperation<BluetoothDevice>>
pub fn FromHostNameAsync<P0>(
hostname: P0,
) -> Result<IAsyncOperation<BluetoothDevice>>where
P0: Param<HostName>,
pub fn FromBluetoothAddressAsync( address: u64, ) -> Result<IAsyncOperation<BluetoothDevice>>
pub fn GetDeviceSelector() -> Result<HSTRING>
pub fn GetDeviceSelectorFromPairingState(pairingstate: bool) -> Result<HSTRING>
pub fn GetDeviceSelectorFromConnectionStatus( connectionstatus: BluetoothConnectionStatus, ) -> Result<HSTRING>
pub fn GetDeviceSelectorFromDeviceName(devicename: &HSTRING) -> Result<HSTRING>
pub fn GetDeviceSelectorFromBluetoothAddress( bluetoothaddress: u64, ) -> Result<HSTRING>
pub fn GetDeviceSelectorFromClassOfDevice<P0>(
classofdevice: P0,
) -> Result<HSTRING>where
P0: Param<BluetoothClassOfDevice>,
pub fn Close(&self) -> Result<()>
Trait Implementations§
§impl CanInto<IInspectable> for BluetoothDevice
impl CanInto<IInspectable> for BluetoothDevice
§impl CanInto<IUnknown> for BluetoothDevice
impl CanInto<IUnknown> for BluetoothDevice
§impl Clone for BluetoothDevice
impl Clone for BluetoothDevice
§fn clone(&self) -> BluetoothDevice
fn clone(&self) -> BluetoothDevice
Returns a copy 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 more§impl Debug for BluetoothDevice
impl Debug for BluetoothDevice
§impl From<&BluetoothDevice> for &IInspectable
impl From<&BluetoothDevice> for &IInspectable
§fn from(value: &BluetoothDevice) -> Self
fn from(value: &BluetoothDevice) -> Self
Converts to this type from the input type.
§impl From<&BluetoothDevice> for &IUnknown
impl From<&BluetoothDevice> for &IUnknown
§fn from(value: &BluetoothDevice) -> Self
fn from(value: &BluetoothDevice) -> Self
Converts to this type from the input type.
§impl From<BluetoothDevice> for IInspectable
impl From<BluetoothDevice> for IInspectable
§fn from(value: BluetoothDevice) -> Self
fn from(value: BluetoothDevice) -> Self
Converts to this type from the input type.
§impl From<BluetoothDevice> for IUnknown
impl From<BluetoothDevice> for IUnknown
§fn from(value: BluetoothDevice) -> Self
fn from(value: BluetoothDevice) -> Self
Converts to this type from the input type.
§impl Interface for BluetoothDevice
impl Interface for BluetoothDevice
§const IID: GUID = <IBluetoothDevice as windows_core::Interface>::IID
const IID: GUID = <IBluetoothDevice as windows_core::Interface>::IID
The
GUID
associated with the interface.§fn as_raw(&self) -> *mut c_void
fn as_raw(&self) -> *mut c_void
Returns the raw COM interface pointer. The resulting pointer continues to be owned by the
Interface
implementation.§fn into_raw(self) -> *mut c_void
fn into_raw(self) -> *mut c_void
Returns the raw COM interface pointer and releases ownership. It the caller’s responsibility to release the COM interface pointer.
§fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
Attempts to cast the current interface to another interface using
QueryInterface
. Read more§fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. Read more§fn is_object<T>(&self) -> boolwhere
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn is_object<T>(&self) -> boolwhere
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
§fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. It returns a reference to the “outer”
object, e.g. &MyApp_Impl
, not the inner &MyApp
object. Read more§fn cast_object<T>(&self) -> Result<ComObject<T>, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_object<T>(&self) -> Result<ComObject<T>, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. It returns a reference to the “outer”
object, e.g. MyApp_Impl
, not the inner MyApp
object. Read more§fn downgrade(&self) -> Result<Weak<Self>, Error>
fn downgrade(&self) -> Result<Weak<Self>, Error>
Attempts to create a [
Weak
] reference to this object.§impl PartialEq for BluetoothDevice
impl PartialEq for BluetoothDevice
§fn eq(&self, other: &BluetoothDevice) -> bool
fn eq(&self, other: &BluetoothDevice) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BluetoothDevice
impl Send for BluetoothDevice
impl StructuralPartialEq for BluetoothDevice
impl Sync for BluetoothDevice
Auto Trait Implementations§
impl Freeze for BluetoothDevice
impl RefUnwindSafe for BluetoothDevice
impl Unpin for BluetoothDevice
impl UnwindSafe for BluetoothDevice
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)