pub enum Frame<I, P> {
Item(I),
Progress(P),
}Expand description
One frame of a call whose caller asked to see progress: an item, or a progress report.
I is the method’s item (a plain T, or a Result<T, E>); P is its
progress type (Note unless the method declares its own).
A caller that does not opt in never sees a Frame — its stream yields
I directly and progress is dropped.
Client-side only; never serialized.
Variants§
Implementations§
Source§impl<I, P> Frame<I, P>
impl<I, P> Frame<I, P>
Sourcepub fn is_item(&self) -> bool
pub fn is_item(&self) -> bool
true for Frame::Item.
Sourcepub fn is_progress(&self) -> bool
pub fn is_progress(&self) -> bool
true for Frame::Progress.
Sourcepub fn into_progress(self) -> Option<P>
pub fn into_progress(self) -> Option<P>
The progress report, if this is one; an item is dropped.
Trait Implementations§
impl<I: Copy, P: Copy> Copy for Frame<I, P>
impl<I: Eq, P: Eq> Eq for Frame<I, P>
Source§impl<T, P> From<Progress<T, P>> for Frame<T, P>
What the server sends as Progress<T, P> arrives as Frame<T, P>:
Update ⇄ Progress, Item ⇄ Item.
impl<T, P> From<Progress<T, P>> for Frame<T, P>
What the server sends as Progress<T, P> arrives as Frame<T, P>:
Update ⇄ Progress, Item ⇄ Item.
impl<I: PartialEq, P: PartialEq> StructuralPartialEq for Frame<I, P>
Auto Trait Implementations§
impl<I, P> Forget for Frame<I, P>
impl<I, P> Freeze for Frame<I, P>
impl<I, P> RefUnwindSafe for Frame<I, P>where
I: RefUnwindSafe,
P: RefUnwindSafe,
impl<I, P> Send for Frame<I, P>
impl<I, P> Sync for Frame<I, P>
impl<I, P> Unpin for Frame<I, P>
impl<I, P> UnsafeUnpin for Frame<I, P>where
I: UnsafeUnpin,
P: UnsafeUnpin,
impl<I, P> UnwindSafe for Frame<I, P>where
I: UnwindSafe,
P: 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