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<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 WorkerFrame
impl PartialEq for WorkerFrame
Source§impl Serialize for WorkerFrame
impl Serialize for WorkerFrame
impl StructuralPartialEq for WorkerFrame
Auto Trait Implementations§
impl Freeze 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