pub struct NonBlocking<'a> {
pub(crate) _marker: PhantomData<&'a mut &'a ()>,
}Expand description
A strategy that uses polling to efficiently wait for an event.
Fields§
§_marker: PhantomData<&'a mut &'a ()>The type &'a mut &'a T is invariant over 'a, like Context is.
We used to just use Context here, but then Context became !Send
and !Sync, making all of the futures that use this type !Send and
!Sync as well. So we just take the lifetime invariance and none of
the downsides.
Trait Implementations§
Source§impl<'a> Clone for NonBlocking<'a>
impl<'a> Clone for NonBlocking<'a>
Source§fn clone(&self) -> NonBlocking<'a>
fn clone(&self) -> NonBlocking<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for NonBlocking<'a>
impl<'a> Debug for NonBlocking<'a>
Source§impl<'a> Default for NonBlocking<'a>
impl<'a> Default for NonBlocking<'a>
Source§fn default() -> NonBlocking<'a>
fn default() -> NonBlocking<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> Hash for NonBlocking<'a>
impl<'a> Hash for NonBlocking<'a>
Source§impl<'a> Ord for NonBlocking<'a>
impl<'a> Ord for NonBlocking<'a>
Source§fn cmp(&self, other: &NonBlocking<'a>) -> Ordering
fn cmp(&self, other: &NonBlocking<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for NonBlocking<'a>
impl<'a> PartialEq for NonBlocking<'a>
Source§impl<'a> PartialOrd for NonBlocking<'a>
impl<'a> PartialOrd for NonBlocking<'a>
Source§impl<'a> Strategy<'_> for NonBlocking<'a>
impl<'a> Strategy<'_> for NonBlocking<'a>
Source§type Future = EventListener
type Future = EventListener
The future returned by the
Strategy::wait method.Source§fn wait(&mut self, evl: EventListener) -> Self::Future
fn wait(&mut self, evl: EventListener) -> Self::Future
Wait for the event listener to become ready.
impl<'a> Copy for NonBlocking<'a>
impl<'a> Eq for NonBlocking<'a>
impl<'a> StructuralPartialEq for NonBlocking<'a>
Auto Trait Implementations§
impl<'a> Freeze for NonBlocking<'a>
impl<'a> RefUnwindSafe for NonBlocking<'a>
impl<'a> Send for NonBlocking<'a>
impl<'a> Sync for NonBlocking<'a>
impl<'a> Unpin for NonBlocking<'a>
impl<'a> !UnwindSafe for NonBlocking<'a>
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