pub struct AwarePolicy<const PEER_TRACK: usize> { /* private fields */ }Implementations§
Source§impl<const PEER_TRACK: usize> AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> AwarePolicy<PEER_TRACK>
pub const fn new(local: RendezvousToken) -> AwarePolicy<PEER_TRACK>
pub fn start<F>(&mut self, emit: &mut F)where
F: FnMut(PolicyAction),
pub fn peer_count(&self) -> usize
pub fn park_reason(&self) -> Option<&'static str>
pub fn is_connected(&self, peer: RendezvousToken) -> bool
pub fn next_deadline_ms(&self) -> Option<u64>
pub fn handle<F>(&mut self, input: PolicyInput, emit: &mut F)where
F: FnMut(PolicyAction),
Auto Trait Implementations§
impl<const PEER_TRACK: usize> Freeze for AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> RefUnwindSafe for AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> Send for AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> Sync for AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> Unpin for AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> UnsafeUnpin for AwarePolicy<PEER_TRACK>
impl<const PEER_TRACK: usize> UnwindSafe for AwarePolicy<PEER_TRACK>
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