[−][src]Struct hciraw::addr::HciSocketAddr
A HCI socket address.
Methods
impl HciSocketAddr
[src]
pub fn new(dev: Option<u16>, chan: HciChannel) -> HciSocketAddr
[src]
Create HCI socket address.
The HCI socket address is characterized by a device and a channel. The following rules apply:
- Device must be set to None for channels: Monitor, Control, Logging
- Device must be set to a valid Bluetooth controller ID for channels: Raw, User
Example
Create HCI socket address associated with no device and control channel
use hciraw::{HciSocketAddr, HciChannel}; let addr = HciSocketAddr::new(None, HciChannel::Control);
Create HCI socket address associated with Bluetooth controller 0 and the raw channel
use hciraw::{HciSocketAddr, HciChannel}; let addr = HciSocketAddr::new(Some(0), HciChannel::Raw);
pub fn len(self) -> socklen_t
[src]
Get the length of the data in bytes. It is always 0x5 for HciSocketAddr.
Trait Implementations
impl Clone for HciSocketAddr
[src]
fn clone(&self) -> HciSocketAddr
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for HciSocketAddr
[src]
impl From<HciSocketAddr> for sockaddr
[src]
fn from(hsa: HciSocketAddr) -> sockaddr
[src]
impl ToHciSocketAddr for HciSocketAddr
[src]
fn to_socket_addr(&self) -> HciSocketAddr
[src]
Auto Trait Implementations
impl RefUnwindSafe for HciSocketAddr
impl Send for HciSocketAddr
impl Sync for HciSocketAddr
impl Unpin for HciSocketAddr
impl UnwindSafe for HciSocketAddr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,