pub enum WebSocketResponse {
Success {
payload: ResponsePayload,
message_id: Option<String>,
},
Error {
code: u16,
message: String,
message_id: Option<String>,
},
SchemaChanged {
payload: SchemaChangedPayload,
},
ChatStreamChunk {
payload: ChatStreamChunkPayload,
},
ChatStreamEnd {
payload: ChatStreamEndPayload,
},
ChatStreamError {
payload: ChatStreamErrorPayload,
},
MutationNotification {
payload: MutationNotificationPayload,
},
ClientToolCall {
payload: ClientToolCallPayload,
},
}Expand description
WebSocket response types from the server
Variants§
Success
Fields
§
payload: ResponsePayloadError
Fields
SchemaChanged
Schema change notification from server (collection config changed)
Fields
§
payload: SchemaChangedPayloadChatStreamChunk
A streamed text chunk from the LLM
Fields
§
payload: ChatStreamChunkPayloadChatStreamEnd
Final message after streaming completes
Fields
§
payload: ChatStreamEndPayloadChatStreamError
Error during chat streaming
Fields
§
payload: ChatStreamErrorPayloadMutationNotification
Mutation notification from a subscription
Fields
§
payload: MutationNotificationPayloadClientToolCall
Server requests the client to execute a tool
Fields
§
payload: ClientToolCallPayloadTrait Implementations§
Source§impl Clone for WebSocketResponse
impl Clone for WebSocketResponse
Source§impl Debug for WebSocketResponse
impl Debug for WebSocketResponse
Source§impl<'de> Deserialize<'de> for WebSocketResponse
impl<'de> Deserialize<'de> for WebSocketResponse
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
Auto Trait Implementations§
impl Freeze for WebSocketResponse
impl RefUnwindSafe for WebSocketResponse
impl Send for WebSocketResponse
impl Sync for WebSocketResponse
impl Unpin for WebSocketResponse
impl UnsafeUnpin for WebSocketResponse
impl UnwindSafe for WebSocketResponse
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