pub enum ResponseV2 {
Frame {
id: String,
block: ResponseBlock,
},
Done {
id: String,
usage: UsageV2,
stop_reason: StopReasonV2,
backend: String,
},
Error {
id: String,
code: ErrorCodeV2,
message: String,
},
}Expand description
Re-exports of the v2 wire types per ADR 0015. v2 is shipped as
part of inferd-client 0.2 so consumers building against v2 can
reach the proto types without a separate inferd-proto dep.
One frame on the v2 response NDJSON stream.
Variants§
Frame
One streaming-output payload.
Fields
§
block: ResponseBlockThe payload — text delta, thinking delta, or complete tool_use.
Done
Terminal frame for a successful generation.
Fields
§
stop_reason: StopReasonV2Why generation stopped.
Error
Terminal frame for a failed generation.
Implementations§
Source§impl ResponseV2
impl ResponseV2
Trait Implementations§
Source§impl Clone for ResponseV2
impl Clone for ResponseV2
Source§fn clone(&self) -> ResponseV2
fn clone(&self) -> ResponseV2
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseV2
impl Debug for ResponseV2
Source§impl<'de> Deserialize<'de> for ResponseV2
impl<'de> Deserialize<'de> for ResponseV2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResponseV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResponseV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ResponseV2
impl PartialEq for ResponseV2
Source§fn eq(&self, other: &ResponseV2) -> bool
fn eq(&self, other: &ResponseV2) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResponseV2
impl Serialize for ResponseV2
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ResponseV2
Auto Trait Implementations§
impl Freeze for ResponseV2
impl RefUnwindSafe for ResponseV2
impl Send for ResponseV2
impl Sync for ResponseV2
impl Unpin for ResponseV2
impl UnsafeUnpin for ResponseV2
impl UnwindSafe for ResponseV2
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