#[non_exhaustive]pub enum PartContent {
Text {
text: String,
},
File {
file: FileContent,
},
Data {
data: Value,
},
}Expand description
The content of a Part, discriminated by a type field per the A2A spec.
In JSON, the type field determines the variant:
"text"→PartContent::Text"file"→PartContent::File"data"→PartContent::Data
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Plain-text content.
File
File content (inline bytes and/or URI reference).
Fields
§
file: FileContentThe file content.
Data
Structured JSON data.
Trait Implementations§
Source§impl Clone for PartContent
impl Clone for PartContent
Source§fn clone(&self) -> PartContent
fn clone(&self) -> PartContent
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 PartContent
impl Debug for PartContent
Source§impl<'de> Deserialize<'de> for PartContent
impl<'de> Deserialize<'de> for PartContent
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 PartialEq for PartContent
impl PartialEq for PartContent
Source§impl Serialize for PartContent
impl Serialize for PartContent
impl Eq for PartContent
impl StructuralPartialEq for PartContent
Auto Trait Implementations§
impl Freeze for PartContent
impl RefUnwindSafe for PartContent
impl Send for PartContent
impl Sync for PartContent
impl Unpin for PartContent
impl UnsafeUnpin for PartContent
impl UnwindSafe for PartContent
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