pub enum OpenAiCreateResponseResponse {
Success {
stats_code: StatusCode,
headers: OpenAiResponseHeaders,
body: ResponseBody,
},
Error {
stats_code: StatusCode,
headers: OpenAiResponseHeaders,
body: OpenAiApiErrorResponse,
},
}Expand description
Full HTTP response for OpenAI responses.create endpoint.
Variants§
Success
Fields
§
stats_code: StatusCodeHTTP status code returned by server (should be 200 OK).
§
headers: OpenAiResponseHeadersResponse headers.
§
body: ResponseBodySuccessful body.
Error
Fields
§
stats_code: StatusCodeHTTP status code returned by server (typically non-2xx).
§
headers: OpenAiResponseHeadersResponse headers.
§
body: OpenAiApiErrorResponseError body.
Trait Implementations§
Source§impl Clone for OpenAiCreateResponseResponse
impl Clone for OpenAiCreateResponseResponse
Source§fn clone(&self) -> OpenAiCreateResponseResponse
fn clone(&self) -> OpenAiCreateResponseResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 OpenAiCreateResponseResponse
impl Debug for OpenAiCreateResponseResponse
Source§impl<'de> Deserialize<'de> for OpenAiCreateResponseResponse
impl<'de> Deserialize<'de> for OpenAiCreateResponseResponse
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
Source§impl PartialEq for OpenAiCreateResponseResponse
impl PartialEq for OpenAiCreateResponseResponse
Source§fn eq(&self, other: &OpenAiCreateResponseResponse) -> bool
fn eq(&self, other: &OpenAiCreateResponseResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<&[OpenAiCreateResponseWebSocketServerMessage]> for OpenAiCreateResponseResponse
impl TryFrom<&[OpenAiCreateResponseWebSocketServerMessage]> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &[OpenAiCreateResponseWebSocketMessageResponse],
) -> Result<Self, TransformError>
fn try_from( value: &[OpenAiCreateResponseWebSocketMessageResponse], ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<ClaudeCreateMessageResponse> for OpenAiCreateResponseResponse
impl TryFrom<ClaudeCreateMessageResponse> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: ClaudeCreateMessageResponse) -> Result<Self, TransformError>
fn try_from(value: ClaudeCreateMessageResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateResponseResponse
impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiChatCompletionsResponse> for OpenAiCreateResponseResponse
impl TryFrom<OpenAiChatCompletionsResponse> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: OpenAiChatCompletionsResponse,
) -> Result<Self, TransformError>
fn try_from( value: OpenAiChatCompletionsResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for ClaudeCreateMessageResponse
impl TryFrom<OpenAiCreateResponseResponse> for ClaudeCreateMessageResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for GeminiGenerateContentResponse
impl TryFrom<OpenAiCreateResponseResponse> for GeminiGenerateContentResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for OpenAiChatCompletionsResponse
impl TryFrom<OpenAiCreateResponseResponse> for OpenAiChatCompletionsResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for OpenAiCreateImageEditResponse
impl TryFrom<OpenAiCreateResponseResponse> for OpenAiCreateImageEditResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for OpenAiCreateImageResponse
impl TryFrom<OpenAiCreateResponseResponse> for OpenAiCreateImageResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for Vec<OpenAiCreateResponseWebSocketMessageResponse>
impl TryFrom<OpenAiCreateResponseResponse> for Vec<OpenAiCreateResponseWebSocketMessageResponse>
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for Vec<ResponseStreamEvent>
impl TryFrom<OpenAiCreateResponseResponse> for Vec<ResponseStreamEvent>
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<Vec<OpenAiCreateResponseWebSocketServerMessage>> for OpenAiCreateResponseResponse
impl TryFrom<Vec<OpenAiCreateResponseWebSocketServerMessage>> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: Vec<OpenAiCreateResponseWebSocketMessageResponse>,
) -> Result<Self, TransformError>
fn try_from( value: Vec<OpenAiCreateResponseWebSocketMessageResponse>, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<Vec<ResponseStreamEvent>> for OpenAiCreateResponseResponse
impl TryFrom<Vec<ResponseStreamEvent>> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: Vec<ResponseStreamEvent>) -> Result<Self, TransformError>
fn try_from(value: Vec<ResponseStreamEvent>) -> Result<Self, TransformError>
Performs the conversion.
impl StructuralPartialEq for OpenAiCreateResponseResponse
Auto Trait Implementations§
impl Freeze for OpenAiCreateResponseResponse
impl RefUnwindSafe for OpenAiCreateResponseResponse
impl Send for OpenAiCreateResponseResponse
impl Sync for OpenAiCreateResponseResponse
impl Unpin for OpenAiCreateResponseResponse
impl UnsafeUnpin for OpenAiCreateResponseResponse
impl UnwindSafe for OpenAiCreateResponseResponse
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