pub struct GlassRequest {
pub protocol_version: u32,
pub request_id: String,
pub correlation_id: Option<String>,
pub session_id: Option<String>,
pub mutation_lease: Option<MutationLeaseRef>,
pub operation: String,
pub payload: Value,
pub deadline_ms: Option<u64>,
}Expand description
Canonical operation request shared by supported transports.
Fields§
§protocol_version: u32§request_id: String§correlation_id: Option<String>§session_id: Option<String>§mutation_lease: Option<MutationLeaseRef>§operation: String§payload: Value§deadline_ms: Option<u64>Implementations§
Source§impl GlassRequest
impl GlassRequest
Sourcepub fn validate(&self) -> Result<(), ProtocolError>
pub fn validate(&self) -> Result<(), ProtocolError>
Validate protocol version, identifiers, operation bounds, and deadline.
Sourcepub fn decode_task_compile(&self) -> Result<TaskCompilePayload, ProtocolError>
pub fn decode_task_compile(&self) -> Result<TaskCompilePayload, ProtocolError>
Decode and validate a typed task.compile payload.
Sourcepub fn decode_task_validate(
&self,
) -> Result<TaskValidationPayload, ProtocolError>
pub fn decode_task_validate( &self, ) -> Result<TaskValidationPayload, ProtocolError>
Decode and validate a typed task.validate payload.
Sourcepub fn decode_web_ir_validate(&self) -> Result<WebIrDraftPayload, ProtocolError>
pub fn decode_web_ir_validate(&self) -> Result<WebIrDraftPayload, ProtocolError>
Decode and validate a typed webIr.validate payload.
Sourcepub fn decode_web_ir_inspect(&self) -> Result<WebIrDraftPayload, ProtocolError>
pub fn decode_web_ir_inspect(&self) -> Result<WebIrDraftPayload, ProtocolError>
Decode and validate a typed webIr.inspect payload.
Sourcepub fn decode_web_ir_diff(&self) -> Result<WebIrDiffPayload, ProtocolError>
pub fn decode_web_ir_diff(&self) -> Result<WebIrDiffPayload, ProtocolError>
Decode and validate a typed webIr.diff payload.
Sourcepub fn decode_web_ir_continuity(
&self,
) -> Result<WebIrContinuityPayload, ProtocolError>
pub fn decode_web_ir_continuity( &self, ) -> Result<WebIrContinuityPayload, ProtocolError>
Decode and validate a typed webIr.continuity payload.
Trait Implementations§
Source§impl Clone for GlassRequest
impl Clone for GlassRequest
Source§fn clone(&self) -> GlassRequest
fn clone(&self) -> GlassRequest
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 GlassRequest
impl Debug for GlassRequest
Source§impl<'de> Deserialize<'de> for GlassRequest
impl<'de> Deserialize<'de> for GlassRequest
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 GlassRequest
impl PartialEq for GlassRequest
Source§impl Serialize for GlassRequest
impl Serialize for GlassRequest
impl StructuralPartialEq for GlassRequest
Auto Trait Implementations§
impl Freeze for GlassRequest
impl RefUnwindSafe for GlassRequest
impl Send for GlassRequest
impl Sync for GlassRequest
impl Unpin for GlassRequest
impl UnsafeUnpin for GlassRequest
impl UnwindSafe for GlassRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more