pub enum BackpressureSignal {
Ready,
Pause,
}Expand description
Backpressure signal from a consumer to the runtime.
Maps directly to the WIT backpressure-signal enum defined in
torvyn:streaming@0.1.0 (Doc 01, Section 3.1).
§Examples
use torvyn_types::BackpressureSignal;
let signal = BackpressureSignal::Pause;
assert!(signal.is_paused());Variants§
Ready
Consumer is ready to accept more data. Normal operation.
Pause
Consumer requests the producer to pause until further notice.
Implementations§
Trait Implementations§
Source§impl Clone for BackpressureSignal
impl Clone for BackpressureSignal
Source§fn clone(&self) -> BackpressureSignal
fn clone(&self) -> BackpressureSignal
Returns a duplicate of the value. Read more
1.0.0 · 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 BackpressureSignal
impl Debug for BackpressureSignal
Source§impl<'de> Deserialize<'de> for BackpressureSignal
impl<'de> Deserialize<'de> for BackpressureSignal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BackpressureSignal
impl Display for BackpressureSignal
Source§impl Hash for BackpressureSignal
impl Hash for BackpressureSignal
Source§impl PartialEq for BackpressureSignal
impl PartialEq for BackpressureSignal
Source§impl Serialize for BackpressureSignal
impl Serialize for BackpressureSignal
impl Copy for BackpressureSignal
impl Eq for BackpressureSignal
impl StructuralPartialEq for BackpressureSignal
Auto Trait Implementations§
impl Freeze for BackpressureSignal
impl RefUnwindSafe for BackpressureSignal
impl Send for BackpressureSignal
impl Sync for BackpressureSignal
impl Unpin for BackpressureSignal
impl UnwindSafe for BackpressureSignal
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