Skip to main content

StreamControl

Enum StreamControl 

Source
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

§stream_id: Symbol

Identifier of the stream being opened.

§metadata: StreamMetadata

Declared metadata (media, direction, clock domain, buffer policy).

§

Next

Request the next chunk(s), bounded by an optional element limit.

Fields

§stream_id: Symbol

Identifier of the stream being pulled.

§limit: Option<u64>

Maximum number of elements to return, or None for unbounded.

§

Push

Push one stream envelope toward the peer.

Fields

§stream_id: Symbol

Identifier of the stream being pushed to.

§envelope: Box<StreamEnvelope>

Boxed envelope carrying the packet, ticks, and transport profile.

§

Close

Close a stream cleanly once production is finished.

Fields

§stream_id: Symbol

Identifier of the stream being closed.

§

Cancel

Cancel a stream early, abandoning any remaining production.

Fields

§stream_id: Symbol

Identifier of the stream being cancelled.

§

Stats

Request runtime statistics for a stream.

Fields

§stream_id: Symbol

Identifier of the stream being queried.

§

Metadata

Request the metadata table for a stream.

Fields

§stream_id: Symbol

Identifier of the stream being queried.

§

Fault

Report a fault against a stream.

Fields

§stream_id: Symbol

Identifier of the faulting stream.

§fault: StreamFaultSpec

Fault kind and occurrence count.

Implementations§

Source§

impl StreamControl

Source

pub fn operation(&self) -> Symbol

Returns the operation symbol naming this control variant.

Source

pub fn required_capability(&self) -> CapabilityName

Returns the capability a peer must hold to perform this control action.

Source

pub fn stream_id(&self) -> &Symbol

Returns the stream identifier targeted by this control action.

Source

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

Source§

fn clone(&self) -> StreamControl

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StreamControl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for StreamControl

Source§

impl PartialEq for StreamControl

Source§

fn eq(&self, other: &StreamControl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for StreamControl

Source§

impl TryFrom<Expr> for StreamControl

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(expr: Expr) -> Result<Self>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.