pub struct ContinuationEnvelope {
pub version: u32,
pub payload: AgentContinuation,
}Expand description
Versioned wrapper around AgentContinuation.
This is the public durable boundary for server persistence.
Servers serialise this envelope (not the raw AgentContinuation)
so future SDK versions can evolve the inner payload while keeping
a stable wire format.
Unknown versions are rejected at resume time, giving servers a clear upgrade signal instead of silent data corruption.
Fields§
§version: u32Schema version — currently CONTINUATION_VERSION.
payload: AgentContinuationThe continuation payload.
Implementations§
Source§impl ContinuationEnvelope
impl ContinuationEnvelope
Sourcepub const fn wrap(payload: AgentContinuation) -> Self
pub const fn wrap(payload: AgentContinuation) -> Self
Wrap a continuation in the current version envelope.
Sourcepub fn unwrap_validated(self) -> Result<AgentContinuation, String>
pub fn unwrap_validated(self) -> Result<AgentContinuation, String>
Validate the envelope version, returning the inner continuation or an error if the version is unknown.
§Errors
Returns an error string if version does not match
CONTINUATION_VERSION.
Trait Implementations§
Source§impl Clone for ContinuationEnvelope
impl Clone for ContinuationEnvelope
Source§fn clone(&self) -> ContinuationEnvelope
fn clone(&self) -> ContinuationEnvelope
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 ContinuationEnvelope
impl Debug for ContinuationEnvelope
Source§impl<'de> Deserialize<'de> for ContinuationEnvelope
impl<'de> Deserialize<'de> for ContinuationEnvelope
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
Auto Trait Implementations§
impl Freeze for ContinuationEnvelope
impl RefUnwindSafe for ContinuationEnvelope
impl Send for ContinuationEnvelope
impl Sync for ContinuationEnvelope
impl Unpin for ContinuationEnvelope
impl UnsafeUnpin for ContinuationEnvelope
impl UnwindSafe for ContinuationEnvelope
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