Enum futures_util::unfold_state::UnfoldState
source · pub(crate) enum UnfoldState<T, R> {
Value {
value: T,
},
Future {
future: R,
},
Empty,
}
Expand description
UnfoldState used for stream and sink unfolds
Variants§
Implementations§
source§impl<T, R> UnfoldState<T, R>
impl<T, R> UnfoldState<T, R>
pub(crate) fn project_future(self: Pin<&mut Self>) -> Option<Pin<&mut R>>
pub(crate) fn take_value(self: Pin<&mut Self>) -> Option<T>
Trait Implementations§
impl<'__pin, T, R> Unpin for UnfoldState<T, R>where
PinnedFieldsOf<__Origin<'__pin, T, R>>: Unpin,
Auto Trait Implementations§
impl<T, R> Freeze for UnfoldState<T, R>
impl<T, R> RefUnwindSafe for UnfoldState<T, R>where
T: RefUnwindSafe,
R: RefUnwindSafe,
impl<T, R> Send for UnfoldState<T, R>
impl<T, R> Sync for UnfoldState<T, R>
impl<T, R> UnwindSafe for UnfoldState<T, R>where
T: UnwindSafe,
R: 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