Struct RelayCache
pub struct RelayCache { /* private fields */ }Implementations§
§impl RelayCache
impl RelayCache
pub fn new(ttl: Duration, capacity: usize) -> RelayCache
pub fn begin_connect( &mut self, key: RelayCacheKey, now: Instant, ) -> RelayConnectSlot
pub fn complete_connect(&mut self, connection: RelayConnection)
pub fn leader_cancelled(&mut self, key: &RelayCacheKey)
pub fn connect_failed(&mut self, key: &RelayCacheKey)
pub fn waiter_cancelled(&mut self, _key: &RelayCacheKey)
pub fn mark_dead(&mut self, key: &RelayCacheKey)
pub fn sweep(&mut self, now: Instant)
pub fn lock_count(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn take_pending_shutdown(&mut self) -> Vec<RelayConnection>
Trait Implementations§
§impl Clone for RelayCache
impl Clone for RelayCache
§fn clone(&self) -> RelayCache
fn clone(&self) -> RelayCache
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 moreAuto Trait Implementations§
impl Freeze for RelayCache
impl RefUnwindSafe for RelayCache
impl Send for RelayCache
impl Sync for RelayCache
impl Unpin for RelayCache
impl UnsafeUnpin for RelayCache
impl UnwindSafe for RelayCache
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