pub struct Throttle<T> { /* private fields */ }Expand description
Stream for the throttle function.
Implementations§
Source§impl<T: Unpin> Throttle<T>
impl<T: Unpin> Throttle<T>
Sourcepub fn get_ref(&self) -> &T
pub fn get_ref(&self) -> &T
Acquires a reference to the underlying stream that this combinator is pulling from.
Sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Acquires a mutable reference to the underlying stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes this combinator, returning the underlying stream.
Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.
Trait Implementations§
Source§impl<T: Stream> Stream for Throttle<T>
impl<T: Stream> Stream for Throttle<T>
impl<'__pin, T> Unpin for Throttle<T>where
__Origin<'__pin, T>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for Throttle<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Throttle<T>
impl<T> Send for Throttle<T>where
T: Send,
impl<T> Sync for Throttle<T>where
T: Sync,
impl<T> !UnwindSafe for Throttle<T>
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