pub struct EnvelopeV3 {
pub request_id: String,
pub api_version: u32,
pub client_identity: IdentityV3,
pub capability: Option<String>,
pub deadline_unix_ms: Option<u64>,
pub feature_schema_hash: Option<String>,
pub model_generation: u64,
pub state_generation: u64,
pub payload_limit: u32,
pub request: RuntimeRequestV3,
}Expand description
V3 request envelope. Every stateful call carries the generations and feature schema against which the caller made its decision.
Fields§
§request_id: String§api_version: u32§client_identity: IdentityV3§capability: Option<String>§deadline_unix_ms: Option<u64>§feature_schema_hash: Option<String>§model_generation: u64§state_generation: u64§payload_limit: u32§request: RuntimeRequestV3Implementations§
Source§impl EnvelopeV3
impl EnvelopeV3
Sourcepub fn validate(&self) -> Result<(), ProtocolV3Error>
pub fn validate(&self) -> Result<(), ProtocolV3Error>
Validate shape, bounded strings, generation requirements and encoded message size. Deadline expiry is checked by the runtime because the protocol crate does not read a clock.
Sourcepub fn is_expired_at(&self, now_unix_ms: u64) -> bool
pub fn is_expired_at(&self, now_unix_ms: u64) -> bool
Whether the request deadline has elapsed at a caller-provided time.
Trait Implementations§
Source§impl Clone for EnvelopeV3
impl Clone for EnvelopeV3
Source§fn clone(&self) -> EnvelopeV3
fn clone(&self) -> EnvelopeV3
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 EnvelopeV3
impl Debug for EnvelopeV3
Source§impl<'de> Deserialize<'de> for EnvelopeV3
impl<'de> Deserialize<'de> for EnvelopeV3
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 EnvelopeV3
impl PartialEq for EnvelopeV3
Source§impl Serialize for EnvelopeV3
impl Serialize for EnvelopeV3
impl StructuralPartialEq for EnvelopeV3
Auto Trait Implementations§
impl Freeze for EnvelopeV3
impl RefUnwindSafe for EnvelopeV3
impl Send for EnvelopeV3
impl Sync for EnvelopeV3
impl Unpin for EnvelopeV3
impl UnsafeUnpin for EnvelopeV3
impl UnwindSafe for EnvelopeV3
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