pub struct UdpRoutingTable<T> { /* private fields */ }
Implementations§
Source§impl<T: Clone> UdpRoutingTable<T>
impl<T: Clone> UdpRoutingTable<T>
pub fn new(session_timeout_secs: u64) -> Self
pub fn register_session(&mut self, external_addr: SocketAddr, local_data: T)
pub fn register_client_session( &mut self, external_addr: SocketAddr, local_addr: SocketAddr, local_data: T, )
pub fn update_activity(&mut self, addr: &SocketAddr, is_external: bool)
pub fn get_session(&self, external_addr: &SocketAddr) -> Option<&UdpSession<T>>
pub fn get_local_data(&self, external_addr: &SocketAddr) -> Option<&T>
pub fn get_external_addr(&self, local_addr: &SocketAddr) -> Option<SocketAddr>
pub fn cleanup_expired_sessions(&mut self) -> usize
pub fn session_count(&self) -> usize
Auto Trait Implementations§
impl<T> Freeze for UdpRoutingTable<T>
impl<T> RefUnwindSafe for UdpRoutingTable<T>where
T: RefUnwindSafe,
impl<T> Send for UdpRoutingTable<T>where
T: Send,
impl<T> Sync for UdpRoutingTable<T>where
T: Sync,
impl<T> Unpin for UdpRoutingTable<T>where
T: Unpin,
impl<T> UnwindSafe for UdpRoutingTable<T>where
T: UnwindSafe,
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