pub struct CapabilityTracker { /* private fields */ }
Expand description
Tracks peer capabilities for gradual migration
Implementations§
Source§impl CapabilityTracker
impl CapabilityTracker
pub fn new() -> Self
Sourcepub fn mark_rfc_capable(&mut self, peer_id: Vec<u8>)
pub fn mark_rfc_capable(&mut self, peer_id: Vec<u8>)
Record that a peer supports RFC frames
Sourcepub fn is_rfc_capable(&self, peer_id: &[u8]) -> bool
pub fn is_rfc_capable(&self, peer_id: &[u8]) -> bool
Check if a peer supports RFC frames
Sourcepub fn cleanup_old_entries(&mut self, max_age: Duration)
pub fn cleanup_old_entries(&mut self, max_age: Duration)
Clean up old entries
Auto Trait Implementations§
impl Freeze for CapabilityTracker
impl RefUnwindSafe for CapabilityTracker
impl Send for CapabilityTracker
impl Sync for CapabilityTracker
impl Unpin for CapabilityTracker
impl UnwindSafe for CapabilityTracker
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