pub enum StreamControl {
Open {
stream_id: Symbol,
metadata: StreamMetadata,
},
Next {
stream_id: Symbol,
limit: Option<u64>,
},
Push {
stream_id: Symbol,
envelope: Box<StreamEnvelope>,
},
Close {
stream_id: Symbol,
},
Cancel {
stream_id: Symbol,
},
Stats {
stream_id: Symbol,
},
Metadata {
stream_id: Symbol,
},
Fault {
stream_id: Symbol,
fault: StreamFaultSpec,
},
}Expand description
Control-plane operation exchanged over remote stream-fabric frames.
Each variant names one action a peer can take on a placed stream – opening
it, pulling the next chunk, pushing an envelope, ending it, or reporting a
fault – so the location-transparent eval surface can drive a remote stream
without exposing transport-specific APIs. A StreamControl round-trips
through the shared Expr graph (see StreamControl::to_expr and the
TryFrom<Expr> impl) and is carried by stream_control_frame_from_control.
Variants§
Open
Open a stream with the given identity and StreamMetadata.
Fields
metadata: StreamMetadataDeclared metadata (media, direction, clock domain, buffer policy).
Next
Request the next chunk(s), bounded by an optional element limit.
Fields
Push
Push one stream envelope toward the peer.
Fields
envelope: Box<StreamEnvelope>Boxed envelope carrying the packet, ticks, and transport profile.
Close
Close a stream cleanly once production is finished.
Cancel
Cancel a stream early, abandoning any remaining production.
Stats
Request runtime statistics for a stream.
Metadata
Request the metadata table for a stream.
Fault
Report a fault against a stream.
Fields
fault: StreamFaultSpecFault kind and occurrence count.
Implementations§
Source§impl StreamControl
impl StreamControl
Sourcepub fn required_capability(&self) -> CapabilityName
pub fn required_capability(&self) -> CapabilityName
Returns the capability a peer must hold to perform this control action.
Sourcepub fn stream_id(&self) -> &Symbol
pub fn stream_id(&self) -> &Symbol
Returns the stream identifier targeted by this control action.
Sourcepub fn to_expr(&self) -> Expr
pub fn to_expr(&self) -> Expr
Encodes this control action as a stream data packet Expr.
The inverse is the TryFrom<Expr> impl, which reparses the packet back
into a StreamControl.
Trait Implementations§
Source§impl Clone for StreamControl
impl Clone for StreamControl
Source§fn clone(&self) -> StreamControl
fn clone(&self) -> StreamControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamControl
impl Debug for StreamControl
impl Eq for StreamControl
Source§impl PartialEq for StreamControl
impl PartialEq for StreamControl
Source§fn eq(&self, other: &StreamControl) -> bool
fn eq(&self, other: &StreamControl) -> bool
self and other values to be equal, and is used by ==.