pub struct StreamSwitch<TValue> { /* private fields */ }Expand description
Used to switch the stream for a corresponding SwitchingStream item
This must be dropped before the corresponding SwitchingStream can be closed
Implementations§
Source§impl<TValue> StreamSwitch<TValue>
impl<TValue> StreamSwitch<TValue>
Sourcepub fn switch_to_stream<TStream: 'static + Send + Stream<Item = TValue>>(
&self,
new_stream: TStream,
)
pub fn switch_to_stream<TStream: 'static + Send + Stream<Item = TValue>>( &self, new_stream: TStream, )
Switches the stream being returned by the corresponding SwitchingStream to the specified new stream
Trait Implementations§
Auto Trait Implementations§
impl<TValue> Freeze for StreamSwitch<TValue>
impl<TValue> RefUnwindSafe for StreamSwitch<TValue>
impl<TValue> Send for StreamSwitch<TValue>
impl<TValue> Sync for StreamSwitch<TValue>
impl<TValue> Unpin for StreamSwitch<TValue>
impl<TValue> UnwindSafe for StreamSwitch<TValue>
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