pub struct GenerationContinuation { /* private fields */ }Expand description
Opaque provider-authored state required to continue one model turn.
Returned assistant messages carry the selected Model’s exact continuation type. Append that message unchanged before the corresponding tool-result message. Native continuation contents have no public constructor or serialization contract. Serializing any message that carries continuation fails rather than discarding it. Caller models may choose their own Clone + Send + Sync continuation type.
§Examples
use providers_kit::generation::{GenerationContinuation, Message};
let message = Message::<GenerationContinuation>::assistant_text("Hello")?;
assert!(message.continuation().is_none());
assert!(serde_json::to_value(&message).is_ok());
Trait Implementations§
Source§impl Clone for GenerationContinuation
impl Clone for GenerationContinuation
Source§impl Debug for GenerationContinuation
impl Debug for GenerationContinuation
Source§impl PartialEq for GenerationContinuation
impl PartialEq for GenerationContinuation
impl StructuralPartialEq for GenerationContinuation
Auto Trait Implementations§
impl Freeze for GenerationContinuation
impl RefUnwindSafe for GenerationContinuation
impl Send for GenerationContinuation
impl Sync for GenerationContinuation
impl Unpin for GenerationContinuation
impl UnsafeUnpin for GenerationContinuation
impl UnwindSafe for GenerationContinuation
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