pub struct StreamPart {
pub mode: StreamMode,
pub ns: Vec<String>,
pub data: Value,
}Expand description
A single chunk emitted by the graph’s streaming interface (v2 format).
Discriminated on the mode field. The ns field carries the namespace
path (empty for top-level graphs). The data field carries the payload.
Fields§
§mode: StreamModeThe stream mode that produced this chunk.
ns: Vec<String>Namespace path (empty for top-level graph).
data: ValueThe payload data.
Implementations§
Source§impl StreamPart
impl StreamPart
pub fn values(ns: Vec<String>, data: JsonValue) -> Self
pub fn updates(ns: Vec<String>, data: JsonValue) -> Self
pub fn messages(ns: Vec<String>, data: JsonValue) -> Self
pub fn custom(ns: Vec<String>, data: JsonValue) -> Self
pub fn tasks(ns: Vec<String>, data: JsonValue) -> Self
pub fn checkpoints(ns: Vec<String>, data: JsonValue) -> Self
pub fn debug(ns: Vec<String>, data: JsonValue) -> Self
Trait Implementations§
Source§impl Clone for StreamPart
impl Clone for StreamPart
Source§fn clone(&self) -> StreamPart
fn clone(&self) -> StreamPart
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 StreamPart
impl Debug for StreamPart
Source§impl<'de> Deserialize<'de> for StreamPart
impl<'de> Deserialize<'de> for StreamPart
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
Auto Trait Implementations§
impl Freeze for StreamPart
impl RefUnwindSafe for StreamPart
impl Send for StreamPart
impl Sync for StreamPart
impl Unpin for StreamPart
impl UnsafeUnpin for StreamPart
impl UnwindSafe for StreamPart
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