pub enum WorkerFrame {
Descriptor {
protocol_version: u16,
descriptor: WorkerDescriptor,
},
Health {
protocol_version: u16,
health: WorkerHealth,
},
Accepted {
protocol_version: u16,
run_id: RunId,
},
Event {
protocol_version: u16,
envelope: RuntimeEventEnvelope,
},
ControlAcknowledged {
protocol_version: u16,
run_id: RunId,
},
Result {
protocol_version: u16,
result: RunResult,
},
Error {
protocol_version: u16,
run_id: Option<RunId>,
error: RuntimeError,
},
}Expand description
Frames returned by a Worker transport. Events and the terminal result may be streamed over WebSocket/SSE or represented by repeated polling without changing their JSON shape.
Variants§
Implementations§
Source§impl WorkerFrame
impl WorkerFrame
pub fn protocol_version(&self) -> u16
pub fn validate_protocol(&self) -> Result<(), RuntimeError>
Trait Implementations§
Source§impl Clone for WorkerFrame
impl Clone for WorkerFrame
Source§fn clone(&self) -> WorkerFrame
fn clone(&self) -> WorkerFrame
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 WorkerFrame
impl Debug for WorkerFrame
Source§impl<'de> Deserialize<'de> for WorkerFrame
impl<'de> Deserialize<'de> for WorkerFrame
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkerFrame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkerFrame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WorkerFrame
impl PartialEq for WorkerFrame
Source§impl Serialize for WorkerFrame
impl Serialize for WorkerFrame
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for WorkerFrame
Auto Trait Implementations§
impl Forget for WorkerFrame
impl Freeze for WorkerFrame
impl Move for WorkerFrame
impl RefUnwindSafe for WorkerFrame
impl Send for WorkerFrame
impl Sync for WorkerFrame
impl Unpin for WorkerFrame
impl UnsafeUnpin for WorkerFrame
impl UnwindSafe for WorkerFrame
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request