pub struct MintedReasoningLifecycle { /* private fields */ }Expand description
The lifecycle state for one stream’s constant-key reasoning block.
Owns the open/close bookkeeping the adapters used to hand-roll; an
adapter never touches a reasoning_open flag or emits a lifecycle event
directly.
Implementations§
Source§impl MintedReasoningLifecycle
impl MintedReasoningLifecycle
Sourcepub fn new(key: StreamPartId) -> MintedReasoningLifecycle
pub fn new(key: StreamPartId) -> MintedReasoningLifecycle
A lifecycle for the given per-stream constant minted key.
Sourcepub fn emit_chunk<R>(
&mut self,
parts: ChunkParts<R>,
out: &mut Vec<Result<RawStreamingChoice<R>, CompletionError>>,
)
pub fn emit_chunk<R>( &mut self, parts: ChunkParts<R>, out: &mut Vec<Result<RawStreamingChoice<R>, CompletionError>>, )
Emit one declared chunk as the canonical event sequence.
Order and boundary are derived, not stated per adapter:
- reasoning delta (opens the block);
- a wire-carried signature closes the block authoritatively;
- other content in the chunk closes a still-open block with a
synthesized silent end (
wire_sent: false— the wire never spelled the boundary, so downstream must not observe a fabricated event); - text, then tool events.
Auto Trait Implementations§
impl Freeze for MintedReasoningLifecycle
impl RefUnwindSafe for MintedReasoningLifecycle
impl Send for MintedReasoningLifecycle
impl Sync for MintedReasoningLifecycle
impl Unpin for MintedReasoningLifecycle
impl UnsafeUnpin for MintedReasoningLifecycle
impl UnwindSafe for MintedReasoningLifecycle
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