pub struct ApiStreamEvent {
pub event: StreamEventKind,
pub operation: String,
pub message: Option<String>,
pub project_name: Option<String>,
pub runtime: Option<RuntimeStatus>,
pub payload: Option<Value>,
pub error_kind: Option<ErrorKind>,
pub metadata: Option<ApiMetadata>,
}Expand description
A single streaming API event. Each serialized event is one NDJSON line.
Fields§
§event: StreamEventKind§operation: String§message: Option<String>§project_name: Option<String>§runtime: Option<RuntimeStatus>§payload: Option<Value>§error_kind: Option<ErrorKind>§metadata: Option<ApiMetadata>Implementations§
Source§impl ApiStreamEvent
impl ApiStreamEvent
Sourcepub fn project_status(
event: StreamEventKind,
response: &ProjectStatusResponse,
message: Option<&str>,
) -> Self
pub fn project_status( event: StreamEventKind, response: &ProjectStatusResponse, message: Option<&str>, ) -> Self
Creates a stream event for the project status operation.
Sourcepub fn operation(
event: StreamEventKind,
operation: impl Into<String>,
metadata: ApiMetadata,
message: Option<&str>,
payload: Option<Value>,
) -> Self
pub fn operation( event: StreamEventKind, operation: impl Into<String>, metadata: ApiMetadata, message: Option<&str>, payload: Option<Value>, ) -> Self
Creates a generic streaming event for non-status operations.
Trait Implementations§
Source§impl Clone for ApiStreamEvent
impl Clone for ApiStreamEvent
Source§fn clone(&self) -> ApiStreamEvent
fn clone(&self) -> ApiStreamEvent
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 ApiStreamEvent
impl Debug for ApiStreamEvent
Source§impl<'de> Deserialize<'de> for ApiStreamEvent
impl<'de> Deserialize<'de> for ApiStreamEvent
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 PartialEq for ApiStreamEvent
impl PartialEq for ApiStreamEvent
Source§fn eq(&self, other: &ApiStreamEvent) -> bool
fn eq(&self, other: &ApiStreamEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ApiStreamEvent
impl Serialize for ApiStreamEvent
impl Eq for ApiStreamEvent
impl StructuralPartialEq for ApiStreamEvent
Auto Trait Implementations§
impl Freeze for ApiStreamEvent
impl RefUnwindSafe for ApiStreamEvent
impl Send for ApiStreamEvent
impl Sync for ApiStreamEvent
impl Unpin for ApiStreamEvent
impl UnsafeUnpin for ApiStreamEvent
impl UnwindSafe for ApiStreamEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.