pub struct InstanceTable { /* private fields */ }Available on crate feature
alloc only.Expand description
The instances a backend currently reports, keyed by (service type, instance name), with no I/O.
Each slot holds the addresses of its latest report, so an address changed in place replaces the old one; an instance’s server, port and TXT are the latest reported, and it leaves the table with its last slot.
Implementations§
Source§impl InstanceTable
impl InstanceTable
Sourcepub fn handle(&mut self, s: Sighting) -> bool
pub fn handle(&mut self, s: Sighting) -> bool
Apply one report; true when the instances it yields changed.
Sourcepub fn get(&self, key: &InstanceKey) -> Option<Instance>
pub fn get(&self, key: &InstanceKey) -> Option<Instance>
One instance.
Trait Implementations§
Source§impl Clone for InstanceTable
impl Clone for InstanceTable
Source§impl Debug for InstanceTable
impl Debug for InstanceTable
Auto Trait Implementations§
impl Freeze for InstanceTable
impl RefUnwindSafe for InstanceTable
impl Send for InstanceTable
impl Sync for InstanceTable
impl Unpin for InstanceTable
impl UnsafeUnpin for InstanceTable
impl UnwindSafe for InstanceTable
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