pub struct ArtifactRef {
pub key: String,
pub size_bytes: u64,
pub content_type: Option<String>,
}Expand description
Reference to an externally stored artifact.
When execution output exceeds inline size limits, the result can reference artifacts stored through ADK artifact mechanisms instead of forcing large binary data into inline JSON strings.
§Example
use adk_code::ArtifactRef;
let artifact = ArtifactRef {
key: "stdout-full".to_string(),
size_bytes: 2_000_000,
content_type: Some("text/plain".to_string()),
};
assert_eq!(artifact.key, "stdout-full");Fields§
§key: StringArtifact storage key or identifier.
size_bytes: u64Size of the artifact in bytes.
content_type: Option<String>MIME content type, if known.
Trait Implementations§
Source§impl Clone for ArtifactRef
impl Clone for ArtifactRef
Source§fn clone(&self) -> ArtifactRef
fn clone(&self) -> ArtifactRef
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 ArtifactRef
impl Debug for ArtifactRef
Source§impl<'de> Deserialize<'de> for ArtifactRef
impl<'de> Deserialize<'de> for ArtifactRef
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 ArtifactRef
impl PartialEq for ArtifactRef
Source§impl Serialize for ArtifactRef
impl Serialize for ArtifactRef
impl Eq for ArtifactRef
impl StructuralPartialEq for ArtifactRef
Auto Trait Implementations§
impl Freeze for ArtifactRef
impl RefUnwindSafe for ArtifactRef
impl Send for ArtifactRef
impl Sync for ArtifactRef
impl Unpin for ArtifactRef
impl UnsafeUnpin for ArtifactRef
impl UnwindSafe for ArtifactRef
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