pub struct SyntheticIds { /* private fields */ }Expand description
Fabricated per-stream keys for wires that carry none.
Every id-less wire mints keys the same way — a MintKind plus a
counter or the wire’s own unsigned index — and the result is a
StreamPartId::Minted that, like every stream key, structurally
cannot reach a request or a public stream item.
Implementations§
Source§impl SyntheticIds
impl SyntheticIds
Sourcepub fn new(kind: MintKind) -> SyntheticIds
pub fn new(kind: MintKind) -> SyntheticIds
A minter for kind.
Sourcepub fn output() -> SyntheticIds
pub fn output() -> SyntheticIds
Keys for the Responses output_index fallback.
Sourcepub fn tool() -> SyntheticIds
pub fn tool() -> SyntheticIds
Keys for tool-call fragments whose wire supplies no tool-call id.
Sourcepub fn text() -> SyntheticIds
pub fn text() -> SyntheticIds
Keys for text blocks opened by a bare Message.
Sourcepub fn mint(&mut self) -> StreamPartId
pub fn mint(&mut self) -> StreamPartId
Mint the next counter-based key (vercel’s blockCounter++ pattern).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyntheticIds
impl RefUnwindSafe for SyntheticIds
impl Send for SyntheticIds
impl Sync for SyntheticIds
impl Unpin for SyntheticIds
impl UnsafeUnpin for SyntheticIds
impl UnwindSafe for SyntheticIds
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