#[non_exhaustive]pub struct StreamMessage {Show 14 fields
pub input_transformations: Option<Option<Vec<InputTransformation>>>,
pub type_: StreamMessageType,
pub id: String,
pub container: Option<Option<ResponseContainer>>,
pub content: Vec<ResponseContentBlock>,
pub context_management: Option<Option<ContextManagementResponse>>,
pub diagnostics: Option<Option<DiagnosticsResponse>>,
pub model: String,
pub role: ResponseRole,
pub stop_details: Option<Option<RefusalStopDetails>>,
pub stop_reason: Option<Option<StreamStopReason>>,
pub stop_sequence: Option<Option<String>>,
pub usage: StreamUsage,
pub rest: Rest,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.input_transformations: Option<Option<Vec<InputTransformation>>>§type_: StreamMessageType§id: String§container: Option<Option<ResponseContainer>>§content: Vec<ResponseContentBlock>§context_management: Option<Option<ContextManagementResponse>>§diagnostics: Option<Option<DiagnosticsResponse>>§model: String§role: ResponseRole§stop_details: Option<Option<RefusalStopDetails>>§stop_reason: Option<Option<StreamStopReason>>§stop_sequence: Option<Option<String>>§usage: StreamUsage§rest: RestImplementations§
Source§impl StreamMessage
impl StreamMessage
Sourcepub fn builder(
type_: StreamMessageType,
id: String,
content: Vec<ResponseContentBlock>,
model: String,
role: ResponseRole,
usage: StreamUsage,
) -> StreamMessageBuilder
pub fn builder( type_: StreamMessageType, id: String, content: Vec<ResponseContentBlock>, model: String, role: ResponseRole, usage: StreamUsage, ) -> StreamMessageBuilder
Start a builder by supplying the required fields in declaration order.
Trait Implementations§
Source§impl Clone for StreamMessage
impl Clone for StreamMessage
Source§impl Debug for StreamMessage
impl Debug for StreamMessage
Source§impl DeclaredFields for StreamMessage
impl DeclaredFields for StreamMessage
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for StreamMessage
impl<'de> Deserialize<'de> for StreamMessage
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 StreamMessage
Source§impl PartialEq for StreamMessage
impl PartialEq for StreamMessage
Source§impl Serialize for StreamMessage
impl Serialize for StreamMessage
impl StructuralPartialEq for StreamMessage
Auto Trait Implementations§
impl Freeze for StreamMessage
impl RefUnwindSafe for StreamMessage
impl Send for StreamMessage
impl Sync for StreamMessage
impl Unpin for StreamMessage
impl UnsafeUnpin for StreamMessage
impl UnwindSafe for StreamMessage
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