pub struct StrandsA2AExecutor { /* private fields */ }Expand description
Executor that adapts a Strands Agent to the A2A protocol.
Implementations§
Source§impl StrandsA2AExecutor
impl StrandsA2AExecutor
Sourcepub async fn execute(&self, message: A2AMessage) -> Result<A2ATask, A2AError>
pub async fn execute(&self, message: A2AMessage) -> Result<A2ATask, A2AError>
Execute a request using the Strands Agent.
Sourcepub async fn execute_streaming<F>(
&self,
message: A2AMessage,
on_update: F,
) -> Result<A2ATask, A2AError>
pub async fn execute_streaming<F>( &self, message: A2AMessage, on_update: F, ) -> Result<A2ATask, A2AError>
Execute a request with streaming.
Sourcepub fn convert_content_blocks_to_a2a_parts(
blocks: &[ContentBlock],
) -> Vec<A2APart>
pub fn convert_content_blocks_to_a2a_parts( blocks: &[ContentBlock], ) -> Vec<A2APart>
Convert Strands content blocks to A2A message parts.
Sourcepub fn get_file_format_from_mime_type(
mime_type: Option<&str>,
file_type: &str,
) -> String
pub fn get_file_format_from_mime_type( mime_type: Option<&str>, file_type: &str, ) -> String
Get file format from MIME type.
Uses the MIME type to determine the appropriate file format. Falls back to default formats if MIME type is unavailable or unrecognized.
Sourcepub fn strip_file_extension(file_name: &str) -> &str
pub fn strip_file_extension(file_name: &str) -> &str
Strip the file extension from a file name.
Sourcepub fn classify_file_type(mime_type: Option<&str>) -> &'static str
pub fn classify_file_type(mime_type: Option<&str>) -> &'static str
Classify file type based on MIME type.
Auto Trait Implementations§
impl Freeze for StrandsA2AExecutor
impl !RefUnwindSafe for StrandsA2AExecutor
impl Send for StrandsA2AExecutor
impl Sync for StrandsA2AExecutor
impl Unpin for StrandsA2AExecutor
impl !UnwindSafe for StrandsA2AExecutor
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.