Struct futures_util::stream::stream::flatten_unordered::PollStateBomb
source · struct PollStateBomb<'a, F: FnOnce(&SharedPollState) -> u8> {
state: &'a SharedPollState,
drop: Option<F>,
}
Expand description
Used to execute some function on the given state when dropped.
Fields§
§state: &'a SharedPollState
§drop: Option<F>
Implementations§
source§impl<'a, F: FnOnce(&SharedPollState) -> u8> PollStateBomb<'a, F>
impl<'a, F: FnOnce(&SharedPollState) -> u8> PollStateBomb<'a, F>
sourcefn new(state: &'a SharedPollState, drop: F) -> Self
fn new(state: &'a SharedPollState, drop: F) -> Self
Constructs new bomb with the given state.
sourcefn deactivate(self)
fn deactivate(self)
Deactivates bomb, forces it to not call provided function when dropped.
Trait Implementations§
Auto Trait Implementations§
impl<'a, F> RefUnwindSafe for PollStateBomb<'a, F>where F: RefUnwindSafe,
impl<'a, F> Send for PollStateBomb<'a, F>where F: Send,
impl<'a, F> Sync for PollStateBomb<'a, F>where F: Sync,
impl<'a, F> Unpin for PollStateBomb<'a, F>where F: Unpin,
impl<'a, F> UnwindSafe for PollStateBomb<'a, F>where F: 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