pub struct DiscoveredParticipantsCache { /* private fields */ }Expand description
In-Memory-Cache aller bisher entdeckten Participants. last_seen
pro Eintrag wird vom Caller (DCPS-Runtime) gegen
participant.lease_duration geprüft, um abgelaufene Participants zu
purgen — der Cache selbst erzwingt kein Timeout.
Implementations§
Source§impl DiscoveredParticipantsCache
impl DiscoveredParticipantsCache
Sourcepub fn insert(&mut self, p: DiscoveredParticipant) -> bool
pub fn insert(&mut self, p: DiscoveredParticipant) -> bool
Insert/Update. Liefert true wenn ein NEUER Participant
hinzugekommen ist (Caller kann darauf einen Listener aufrufen).
Sourcepub fn get(&self, prefix: &GuidPrefix) -> Option<&DiscoveredParticipant>
pub fn get(&self, prefix: &GuidPrefix) -> Option<&DiscoveredParticipant>
Lookup nach Prefix.
Sourcepub fn iter(&self) -> impl Iterator<Item = &DiscoveredParticipant>
pub fn iter(&self) -> impl Iterator<Item = &DiscoveredParticipant>
Iter ueber alle bekannten Participants.
Trait Implementations§
Source§impl Clone for DiscoveredParticipantsCache
impl Clone for DiscoveredParticipantsCache
Source§fn clone(&self) -> DiscoveredParticipantsCache
fn clone(&self) -> DiscoveredParticipantsCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiscoveredParticipantsCache
impl Debug for DiscoveredParticipantsCache
Source§impl Default for DiscoveredParticipantsCache
impl Default for DiscoveredParticipantsCache
Source§fn default() -> DiscoveredParticipantsCache
fn default() -> DiscoveredParticipantsCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiscoveredParticipantsCache
impl RefUnwindSafe for DiscoveredParticipantsCache
impl Send for DiscoveredParticipantsCache
impl Sync for DiscoveredParticipantsCache
impl Unpin for DiscoveredParticipantsCache
impl UnsafeUnpin for DiscoveredParticipantsCache
impl UnwindSafe for DiscoveredParticipantsCache
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