pub struct ArtifactRef {
pub key: String,
pub size_bytes: u64,
pub content_type: Option<String>,
}Available on crate feature
code only.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 (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 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<ArtifactRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArtifactRef, <__D as Deserializer<'de>>::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§fn eq(&self, other: &ArtifactRef) -> bool
fn eq(&self, other: &ArtifactRef) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ArtifactRef
impl Serialize for ArtifactRef
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.