pub enum Wanted {
Instance(String),
DeviceId(String),
}Available on crate feature
alloc only.Expand description
The particular broker a host wants among those discovered.
Variants§
Instance(String)
The broker with this instance name, compared ignoring case.
DeviceId(String)
The broker whose TXT device_id lists this id, under any of its
transports: an endpoint matches when its own device_id lists the
id, or when a sighted endpoint of the same broker (sharing a host name
or SRV target), of any broker type, lists it.
Implementations§
Source§impl Wanted
impl Wanted
Sourcepub fn matches(&self, ep: &BrokerEndpoint, sighted: &[BrokerEndpoint]) -> bool
pub fn matches(&self, ep: &BrokerEndpoint, sighted: &[BrokerEndpoint]) -> bool
True when ep is the wanted broker. sighted is every broker
endpoint seen, of every type, ep among them or not; a
Wanted::DeviceId reads the device_id of ep and of the
endpoints in sighted that share its host name or SRV target.
Trait Implementations§
impl Eq for Wanted
impl StructuralPartialEq for Wanted
Auto Trait Implementations§
impl Freeze for Wanted
impl RefUnwindSafe for Wanted
impl Send for Wanted
impl Sync for Wanted
impl Unpin for Wanted
impl UnsafeUnpin for Wanted
impl UnwindSafe for Wanted
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