pub struct ModelProviderReplay { /* private fields */ }Expand description
Exact bounded provider response fragment required for stateless continuation.
The payload is deliberately opaque to core semantics. Adapters validate its complete provider shape when producing and consuming it. The domain-separated digest binds both the format and canonical payload so a stored fragment cannot be reinterpreted as another continuation syntax.
Implementations§
Source§impl ModelProviderReplay
impl ModelProviderReplay
Sourcepub fn new(
format: ModelProviderReplayFormat,
payload: BoundedJson,
) -> Result<Self, ModelProviderReplayError>
pub fn new( format: ModelProviderReplayFormat, payload: BoundedJson, ) -> Result<Self, ModelProviderReplayError>
Constructs an array-root replay fragment and computes its digest.
§Errors
Returns ModelProviderReplayError unless the payload is an array.
Sourcepub const fn format(&self) -> &ModelProviderReplayFormat
pub const fn format(&self) -> &ModelProviderReplayFormat
Returns the exact adapter-owned format identity.
Sourcepub const fn payload(&self) -> &BoundedJson
pub const fn payload(&self) -> &BoundedJson
Returns the opaque bounded array without permitting mutation.
Sourcepub const fn digest(&self) -> Digest
pub const fn digest(&self) -> Digest
Returns the digest binding format and canonical payload bytes.
Sourcepub fn payload_bytes(&self) -> ByteCount
pub fn payload_bytes(&self) -> ByteCount
Returns compact payload bytes retained by this fragment.
Trait Implementations§
Source§impl Clone for ModelProviderReplay
impl Clone for ModelProviderReplay
Source§impl Debug for ModelProviderReplay
impl Debug for ModelProviderReplay
Source§impl<'de> Deserialize<'de> for ModelProviderReplay
impl<'de> Deserialize<'de> for ModelProviderReplay
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
impl Eq for ModelProviderReplay
Source§impl JsonSchema for ModelProviderReplay
impl JsonSchema for ModelProviderReplay
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ModelProviderReplay
impl PartialEq for ModelProviderReplay
Source§impl Serialize for ModelProviderReplay
impl Serialize for ModelProviderReplay
impl StructuralPartialEq for ModelProviderReplay
Auto Trait Implementations§
impl Forget for ModelProviderReplay
impl Freeze for ModelProviderReplay
impl Move for ModelProviderReplay
impl RefUnwindSafe for ModelProviderReplay
impl Send for ModelProviderReplay
impl Sync for ModelProviderReplay
impl Unpin for ModelProviderReplay
impl UnsafeUnpin for ModelProviderReplay
impl UnwindSafe for ModelProviderReplay
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