pub struct MediaFacts {Show 13 fields
pub provider: Option<String>,
pub model: Option<String>,
pub hosts: Vec<String>,
pub data_class: Option<String>,
pub estimated_cost_micro_usd: Option<u64>,
pub estimate_detail: Option<String>,
pub actual_cost_micro_usd: Option<u64>,
pub actual_detail: Option<String>,
pub cut_from: Option<String>,
pub cut_note: Option<String>,
pub source_href: Option<String>,
pub retention_days: Option<u32>,
pub images: Vec<ImageFacts>,
}Expand description
What a feature knows about the images one of its calls would send, which the evidence
alone does not say: where they go, what they are, the estimated cost and what they were cut
from (spec 3.7 §8.2). A CardHint carries it.
§Example
use adk_surface::{CardHint, MediaFacts};
let hint = CardHint::new().with_media(
MediaFacts::new().to("Gemini", "gemini-3.8-flash", ["generativelanguage.googleapis.com"]),
);
assert!(hint.media.is_some());Fields§
§provider: Option<String>Who receives the images, as a person knows them: “Claude”.
model: Option<String>The model: claude-sonnet-5-5.
hosts: Vec<String>The hosts the images go to: api.anthropic.com.
data_class: Option<String>The data class the images are released as, such as document_crop.
estimated_cost_micro_usd: Option<u64>The estimated cost of the call in micro-USD: the preflight’s hold.
estimate_detail: Option<String>What the estimate counts: “851 image tokens”.
actual_cost_micro_usd: Option<u64>What the call cost, once it ran.
actual_detail: Option<String>What the actual cost counts: “851 image tokens, 63 answer tokens”.
cut_from: Option<String>What the images were cut from: “Page 2 of claim-0412.pdf”.
cut_note: Option<String>How they were cut: “nothing resized”.
source_href: Option<String>Where an authorised viewer opens the source image: a path in the home. Absent when the viewer may not (board choice A9).
retention_days: Option<u32>How many days the images are kept as evidence; EVIDENCE_RETENTION_DAYS when unset.
images: Vec<ImageFacts>One entry per image, in the order of the evidence.
Implementations§
Source§impl MediaFacts
impl MediaFacts
Sourcepub fn to(
self,
provider: impl Into<String>,
model: impl Into<String>,
hosts: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn to( self, provider: impl Into<String>, model: impl Into<String>, hosts: impl IntoIterator<Item = impl Into<String>>, ) -> Self
The images go to provider’s model at hosts.
Sourcepub fn with_data_class(self, class: impl Into<String>) -> Self
pub fn with_data_class(self, class: impl Into<String>) -> Self
The images are released as class, such as document_crop.
Sourcepub fn with_estimated_cost(self, micro_usd: u64, detail: Option<String>) -> Self
pub fn with_estimated_cost(self, micro_usd: u64, detail: Option<String>) -> Self
The preflight estimates micro_usd, counting detail.
Sourcepub fn with_actual_cost(self, micro_usd: u64, detail: Option<String>) -> Self
pub fn with_actual_cost(self, micro_usd: u64, detail: Option<String>) -> Self
The call cost micro_usd, counting detail.
Sourcepub fn with_cut_from(self, source: impl Into<String>) -> Self
pub fn with_cut_from(self, source: impl Into<String>) -> Self
The images were cut from source.
Sourcepub fn with_cut_note(self, note: impl Into<String>) -> Self
pub fn with_cut_note(self, note: impl Into<String>) -> Self
How they were cut: “nothing resized”.
Sourcepub fn with_source_href(self, href: impl Into<String>) -> Self
pub fn with_source_href(self, href: impl Into<String>) -> Self
An authorised viewer opens the source image at href, a path in the home.
Sourcepub fn with_retention_days(self, days: u32) -> Self
pub fn with_retention_days(self, days: u32) -> Self
The images are kept as evidence for days.
Sourcepub fn with_image(self, image: ImageFacts) -> Self
pub fn with_image(self, image: ImageFacts) -> Self
Adds the facts of the next image.
Trait Implementations§
Source§impl Clone for MediaFacts
impl Clone for MediaFacts
Source§impl Debug for MediaFacts
impl Debug for MediaFacts
Source§impl Default for MediaFacts
impl Default for MediaFacts
impl Eq for MediaFacts
Source§impl PartialEq for MediaFacts
impl PartialEq for MediaFacts
impl StructuralPartialEq for MediaFacts
Auto Trait Implementations§
impl Forget for MediaFacts
impl Freeze for MediaFactswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<ImageFacts>: Freeze,
impl Move for MediaFacts
impl RefUnwindSafe for MediaFacts
impl Send for MediaFactswhere
RawVecInner: Send,
impl Sync for MediaFactswhere
RawVecInner: Sync,
impl Unpin for MediaFacts
impl UnsafeUnpin for MediaFactswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<ImageFacts>: UnsafeUnpin,
impl UnwindSafe for MediaFactswhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more