pub struct SnCache { /* private fields */ }
Implementations§
Source§impl SnCache
impl SnCache
pub fn new() -> Self
pub fn add_known_sn(&self, sn_list: &Vec<DeviceId>)
pub fn reset_known_sn(&self, sn_list: &Vec<DeviceId>)
pub fn nearest_sn_of( remote: &DeviceId, sn_list: &[DeviceId], ) -> Option<DeviceId>
pub fn known_list(&self) -> Vec<DeviceId> ⓘ
pub fn add_active(&self, sn: &DeviceId, active: EndpointPair)
pub fn get_active(&self, sn: &DeviceId) -> Option<EndpointPair>
pub fn remove_active(&self, sn: &DeviceId)
Auto Trait Implementations§
impl !Freeze for SnCache
impl RefUnwindSafe for SnCache
impl Send for SnCache
impl Sync for SnCache
impl Unpin for SnCache
impl UnwindSafe for SnCache
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more