EnumerationOptions
pub struct EnumerationOptions
Filters applied while enumerating.
Built with EnumerationOptions::new, which applies the SDK's own
defaults: no simulated devices, no network search, no filters, and
a 3000 ms network timeout.
EnumerationOptions — methods
pub fn new() -> Self
The SDK's default filters.
Panics
Never in practice. The underlying initialiser can only fail on a NULL pointer, and the pointer is to a local.
pub fn include_simulated(mut self, yes: bool) -> Self
Include a simulated device in the results.
pub fn include_network(mut self, yes: bool) -> Self
Search the network as well as local buses.
This is what makes enumeration slow: the call blocks for up to the discovery timeout waiting for devices to answer. Off by default for that reason.
pub fn network_timeout_ms(mut self, ms: u32) -> Self
How long to wait for network devices to answer, in whole milliseconds.
Ignored unless EnumerationOptions::include_network is set.
Zero here is an honest zero, unlike the two timeouts on
crate::NetworkTarget: the sweep still broadcasts once and
collects nothing. It is one of only two millisecond fields in
the ABI that does not read zero as "use the SDK default", which
is why nothing refuses it.
pub fn only_device_type(mut self, device_type: DeviceType) -> Self
Report only devices of one model.
pub fn only_connection(mut self, connection: ConnectionType) -> Self
Report only devices on one kind of attachment.