pub enum DataRef {
InlineText(String),
InlineBytes(Vec<u8>),
Uri(String),
Handle(ArtifactId),
}Expand description
A reference to content data that may live inline, at a URI, or in an artifact store.
Used by MediaPart, FilePart, ReasoningPart, and CustomPart
to point at their underlying data without dictating storage.
Variants§
InlineText(String)
UTF-8 text stored inline (e.g. base64-encoded image data).
InlineBytes(Vec<u8>)
Raw bytes stored inline.
Uri(String)
A URI pointing to externally hosted content.
Handle(ArtifactId)
A handle to an artifact managed by an external store.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataRef
impl<'de> Deserialize<'de> for DataRef
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
impl Eq for DataRef
impl StructuralPartialEq for DataRef
Auto Trait Implementations§
impl Freeze for DataRef
impl RefUnwindSafe for DataRef
impl Send for DataRef
impl Sync for DataRef
impl Unpin for DataRef
impl UnsafeUnpin for DataRef
impl UnwindSafe for DataRef
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