pub struct InlineDataPart {
pub mime_type: String,
pub data: Vec<u8>,
}Expand description
Core traits and types.
Always available regardless of feature flags. Includes:
Agent- The fundamental trait for all agentsTool/Toolset- For extending agents with capabilitiesSession/State- For managing conversation contextEvent- For streaming agent responsesAdkError/Result- Unified error handling Data part for inline binary content in a function response.
Carries a MIME type and raw binary payload for images, audio, PDFs, etc.
§Example
use adk_core::InlineDataPart;
let part = InlineDataPart {
mime_type: "image/png".to_string(),
data: vec![0x89, 0x50, 0x4E, 0x47],
};Fields§
§mime_type: String§data: Vec<u8>Trait Implementations§
Source§impl Clone for InlineDataPart
impl Clone for InlineDataPart
Source§fn clone(&self) -> InlineDataPart
fn clone(&self) -> InlineDataPart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InlineDataPart
impl Debug for InlineDataPart
Source§impl<'de> Deserialize<'de> for InlineDataPart
impl<'de> Deserialize<'de> for InlineDataPart
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InlineDataPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InlineDataPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InlineDataPart
impl PartialEq for InlineDataPart
Source§fn eq(&self, other: &InlineDataPart) -> bool
fn eq(&self, other: &InlineDataPart) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InlineDataPart
impl Serialize for InlineDataPart
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for InlineDataPart
Auto Trait Implementations§
impl Freeze for InlineDataPart
impl RefUnwindSafe for InlineDataPart
impl Send for InlineDataPart
impl Sync for InlineDataPart
impl Unpin for InlineDataPart
impl UnsafeUnpin for InlineDataPart
impl UnwindSafe for InlineDataPart
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