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

Method len

crates/chat-cli/src/api_client/model.rs:590–603  ·  view source on GitHub ↗

Returns the length of the content of the message event - ie, the number of bytes of content contained within the message. This doesn't reflect the actual number of bytes the message took up being serialized over the network.

(&self)

Source from the content-addressed store, hash-verified

588 /// This doesn't reflect the actual number of bytes the message took up being serialized over
589 /// the network.
590 pub fn len(&self) -> usize {
591 match self {
592 ChatResponseStream::AssistantResponseEvent { content } => content.len(),
593 ChatResponseStream::CodeEvent { content } => content.len(),
594 ChatResponseStream::CodeReferenceEvent(_) => 0,
595 ChatResponseStream::FollowupPromptEvent(_) => 0,
596 ChatResponseStream::IntentsEvent(_) => 0,
597 ChatResponseStream::InvalidStateEvent { .. } => 0,
598 ChatResponseStream::MessageMetadataEvent { .. } => 0,
599 ChatResponseStream::SupplementaryWebLinksEvent(_) => 0,
600 ChatResponseStream::ToolUseEvent { input, .. } => input.as_ref().map(|s| s.len()).unwrap_or_default(),
601 ChatResponseStream::Unknown => 0,
602 }
603 }
604
605 #[allow(dead_code)]
606 pub fn is_empty(&self) -> bool {

Callers 15

initialize_loggingFunction · 0.45
classify_error_kindFunction · 0.45
split_tool_use_eventFunction · 0.45
serializeMethod · 0.45
is_emptyMethod · 0.45
get_error_reasonFunction · 0.45
scopes_matchFunction · 0.45
appendFunction · 0.45
executeMethod · 0.45
executeMethod · 0.45
blockquoteFunction · 0.45

Calls 2

mapMethod · 0.80
as_refMethod · 0.45