pub struct StreamTerminalState { /* private fields */ }Expand description
Shared terminal state with idempotent transition semantics.
Implementations§
Source§impl StreamTerminalState
impl StreamTerminalState
Sourcepub fn status(&self) -> StreamTerminal
pub fn status(&self) -> StreamTerminal
Return the current terminal state.
Sourcepub fn finish(&self, requested: StreamTerminal) -> StreamTerminal
pub fn finish(&self, requested: StreamTerminal) -> StreamTerminal
Move from Open to a terminal state once; later transitions retain the first result.
Sourcepub fn ensure_open(&self) -> Result<()>
pub fn ensure_open(&self) -> Result<()>
Verify that another batch may be requested from this stream.
Trait Implementations§
Source§impl Clone for StreamTerminalState
impl Clone for StreamTerminalState
Source§fn clone(&self) -> StreamTerminalState
fn clone(&self) -> StreamTerminalState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamTerminalState
impl Debug for StreamTerminalState
Auto Trait Implementations§
impl Freeze for StreamTerminalState
impl RefUnwindSafe for StreamTerminalState
impl Send for StreamTerminalState
impl Sync for StreamTerminalState
impl Unpin for StreamTerminalState
impl UnsafeUnpin for StreamTerminalState
impl UnwindSafe for StreamTerminalState
Blanket Implementations§
impl<T> Allocation for T
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