pub struct ModelTranscript { /* private fields */ }Expand description
Bounded ordered prior model/tool turns for one stateless request.
Implementations§
Source§impl ModelTranscript
impl ModelTranscript
Sourcepub const MAX_PAYLOAD_BYTES: ByteCount
pub const MAX_PAYLOAD_BYTES: ByteCount
Maximum canonical transcript bytes in one request.
Sourcepub fn try_new<I>(turns: I) -> Result<Self, ModelTranscriptError>where
I: IntoIterator<Item = ModelTranscriptTurn>,
pub fn try_new<I>(turns: I) -> Result<Self, ModelTranscriptError>where
I: IntoIterator<Item = ModelTranscriptTurn>,
Validates a complete ordered transcript.
§Errors
Rejects excessive size/count, model or provider-format drift, and reuse of any attempt, provider-call, or logical tool-invocation identity.
Sourcepub const fn as_slice(&self) -> &[ModelTranscriptTurn]
pub const fn as_slice(&self) -> &[ModelTranscriptTurn]
Returns turns in exact provider continuation order.
Sourcepub fn iter(&self) -> Iter<'_, ModelTranscriptTurn> ⓘ
pub fn iter(&self) -> Iter<'_, ModelTranscriptTurn> ⓘ
Iterates turns in exact provider continuation order.
Sourcepub const fn payload_bytes(&self) -> ByteCount
pub const fn payload_bytes(&self) -> ByteCount
Returns aggregate canonical bytes retained by the transcript.
Sourcepub fn model(&self) -> Option<&CapabilityIdentity>
pub fn model(&self) -> Option<&CapabilityIdentity>
Returns the pinned model identity, absent for an empty transcript.
Sourcepub fn format(&self) -> Option<&ModelProviderReplayFormat>
pub fn format(&self) -> Option<&ModelProviderReplayFormat>
Returns the pinned provider replay format, absent for an empty transcript.
Trait Implementations§
Source§impl Clone for ModelTranscript
impl Clone for ModelTranscript
Source§impl Debug for ModelTranscript
impl Debug for ModelTranscript
Source§impl Default for ModelTranscript
impl Default for ModelTranscript
Source§impl<'de> Deserialize<'de> for ModelTranscript
impl<'de> Deserialize<'de> for ModelTranscript
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 ModelTranscript
Source§impl<'a> IntoIterator for &'a ModelTranscript
impl<'a> IntoIterator for &'a ModelTranscript
Source§impl JsonSchema for ModelTranscript
impl JsonSchema for ModelTranscript
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 ModelTranscript
impl PartialEq for ModelTranscript
Source§impl Serialize for ModelTranscript
impl Serialize for ModelTranscript
impl StructuralPartialEq for ModelTranscript
Auto Trait Implementations§
impl Forget for ModelTranscript
impl Freeze for ModelTranscript
impl Move for ModelTranscript
impl RefUnwindSafe for ModelTranscript
impl Send for ModelTranscript
impl Sync for ModelTranscript
impl Unpin for ModelTranscript
impl UnsafeUnpin for ModelTranscript
impl UnwindSafe for ModelTranscript
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