MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / try_from

Method try_from

crates/chat-cli/src/api_client/model.rs:111–120  ·  view source on GitHub ↗
(value: ChatMessage)

Source from the content-addressed store, hash-verified

109 type Error = aws_smithy_types::error::operation::BuildError;
110
111 fn try_from(value: ChatMessage) -> Result<Self, Self::Error> {
112 Ok(match value {
113 ChatMessage::AssistantResponseMessage(message) => {
114 amzn_codewhisperer_streaming_client::types::ChatMessage::AssistantResponseMessage(message.try_into()?)
115 },
116 ChatMessage::UserInputMessage(message) => {
117 amzn_codewhisperer_streaming_client::types::ChatMessage::UserInputMessage(message.into())
118 },
119 })
120 }
121}
122
123impl TryFrom<ChatMessage> for amzn_qdeveloper_streaming_client::types::ChatMessage {

Callers

nothing calls this directly

Calls 7

mapMethod · 0.80
UserInputMessageClass · 0.70
buildMethod · 0.45
set_tool_usesMethod · 0.45
set_message_idMethod · 0.45
contentMethod · 0.45

Tested by

no test coverage detected