pub enum ClaudeCreateMessageResponse {
Success {
stats_code: StatusCode,
headers: ClaudeResponseHeaders,
body: ResponseBody,
},
Error {
stats_code: StatusCode,
headers: ClaudeResponseHeaders,
body: BetaErrorResponse,
},
}Expand description
Full HTTP response for Claude “Create a Message” endpoint.
Variants§
Success
Fields
§
stats_code: StatusCodeHTTP status code returned by server (should be 200 OK).
§
headers: ClaudeResponseHeadersResponse headers.
§
body: ResponseBodySuccessful body.
Error
Fields
§
stats_code: StatusCodeHTTP status code returned by server (typically 400/401/403/404/413/429/500/529).
§
headers: ClaudeResponseHeadersResponse headers.
§
body: BetaErrorResponseError body.
Trait Implementations§
Source§impl Clone for ClaudeCreateMessageResponse
impl Clone for ClaudeCreateMessageResponse
Source§fn clone(&self) -> ClaudeCreateMessageResponse
fn clone(&self) -> ClaudeCreateMessageResponse
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 ClaudeCreateMessageResponse
impl Debug for ClaudeCreateMessageResponse
Source§impl<'de> Deserialize<'de> for ClaudeCreateMessageResponse
impl<'de> Deserialize<'de> for ClaudeCreateMessageResponse
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 TryFrom<ClaudeCreateMessageResponse> for GeminiGenerateContentResponse
impl TryFrom<ClaudeCreateMessageResponse> for GeminiGenerateContentResponse
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<ClaudeCreateMessageResponse> for OpenAiChatCompletionsResponse
impl TryFrom<ClaudeCreateMessageResponse> for OpenAiChatCompletionsResponse
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<ClaudeCreateMessageResponse> for OpenAiCompactResponse
impl TryFrom<ClaudeCreateMessageResponse> for OpenAiCompactResponse
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<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 ClaudeCreateMessageResponse
impl TryFrom<GeminiGenerateContentResponse> for ClaudeCreateMessageResponse
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 ClaudeCreateMessageResponse
impl TryFrom<OpenAiChatCompletionsResponse> for ClaudeCreateMessageResponse
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<Vec<ClaudeStreamEvent>> for ClaudeCreateMessageResponse
impl TryFrom<Vec<ClaudeStreamEvent>> for ClaudeCreateMessageResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: Vec<ClaudeStreamEvent>) -> Result<Self, TransformError>
fn try_from(value: Vec<ClaudeStreamEvent>) -> Result<Self, TransformError>
Performs the conversion.
impl StructuralPartialEq for ClaudeCreateMessageResponse
Auto Trait Implementations§
impl Freeze for ClaudeCreateMessageResponse
impl RefUnwindSafe for ClaudeCreateMessageResponse
impl Send for ClaudeCreateMessageResponse
impl Sync for ClaudeCreateMessageResponse
impl Unpin for ClaudeCreateMessageResponse
impl UnsafeUnpin for ClaudeCreateMessageResponse
impl UnwindSafe for ClaudeCreateMessageResponse
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