pub struct EdgeRegistry { /* private fields */ }Expand description
In-memory cache around discover. Re-resolves once the TTL
expires; otherwise hands out a fresh shuffle of the previous
result so callers see a different head edge across calls.
Implementations§
Source§impl EdgeRegistry
impl EdgeRegistry
pub fn new() -> Self
pub fn with_ttl(ttl: Duration) -> Self
pub async fn get_or_refresh( &self, filter: IpVersionFilter, ) -> Result<Vec<EdgeAddr>, TunnelError>
Trait Implementations§
Source§impl Clone for EdgeRegistry
impl Clone for EdgeRegistry
Source§fn clone(&self) -> EdgeRegistry
fn clone(&self) -> EdgeRegistry
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 EdgeRegistry
impl !RefUnwindSafe for EdgeRegistry
impl Send for EdgeRegistry
impl Sync for EdgeRegistry
impl Unpin for EdgeRegistry
impl UnsafeUnpin for EdgeRegistry
impl !UnwindSafe for EdgeRegistry
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