pub struct HostConfig {
pub data_dir: Option<PathBuf>,
pub device_name: String,
pub appearance: u16,
pub io_capability: IoCapability,
pub agent: Arc<dyn Agent>,
pub bonding: bool,
pub mitm: bool,
pub secure_connections_only: bool,
pub allow_debug_keys: bool,
pub use_public_address: bool,
pub event_capacity: usize,
}Expand description
How the host presents itself and pairs.
Fields§
§data_dir: Option<PathBuf>Where bonds and the local identity are kept; None keeps them in memory only.
device_name: StringThe name in the GAP service (and the default advertising name).
appearance: u16The GAP Appearance value.
io_capability: IoCapabilityOur input and output capabilities for pairing.
agent: Arc<dyn Agent>Answers pairing prompts (passkeys, numeric comparison, OOB data).
bonding: boolBond when pairing (store keys so the device stays trusted).
mitm: boolInsist on MITM protection (rules out Just Works).
secure_connections_only: boolRefuse LE legacy pairing (Secure Connections only).
allow_debug_keys: boolAccept a peer that uses the published debug key (insecure; tests only).
use_public_address: boolUse the controller’s public address as our identity when it has one;
otherwise (or when false) a static random address kept in data_dir.
event_capacity: usizeCapacity of the event channel; slow readers lose the oldest events.
Trait Implementations§
Source§impl Clone for HostConfig
impl Clone for HostConfig
Auto Trait Implementations§
impl !RefUnwindSafe for HostConfig
impl !UnwindSafe for HostConfig
impl Forget for HostConfig
impl Freeze for HostConfig
impl Move for HostConfig
impl Send for HostConfig
impl Sync for HostConfig
impl Unpin for HostConfig
impl UnsafeUnpin for HostConfig
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