pub struct Ui { /* private fields */ }Expand description
A renderer for agent86UI (AgentBuilder::ui): the A2UI catalogs it
draws, in order of preference.
Implementations§
Source§impl Ui
impl Ui
Sourcepub fn basic() -> Self
pub fn basic() -> Self
A renderer for the specification’s basic catalog, which Google’s renderers implement.
Sourcepub fn new(catalogs: impl IntoIterator<Item = Catalog>) -> Self
pub fn new(catalogs: impl IntoIterator<Item = Catalog>) -> Self
A renderer for catalogs (load one with Catalog::from_value), in
order of preference.
Sourcepub fn on_wait(
self,
answer: impl Fn(&UiWait) -> Option<Action> + Send + Sync + 'static,
) -> Self
pub fn on_wait( self, answer: impl Fn(&UiWait) -> Option<Action> + Send + Sync + 'static, ) -> Self
Let the model wait for the user’s answer (render_ui with wait), for
a form in the middle of a task: once the call’s TurnEvent::Ui
messages are out, answer is asked for the first Action the user
takes on one of UiWait::surface_ids, or None when they dismiss it.
Called on the turn’s thread, one question at a time with approvals, and
never once the turn is cancelled. The action’s context becomes the call’s
result, through the vault and the ingress guardrail as typed input does.
Without it, a waiting call is refused and the model asks without waiting.
Sourcepub fn allow_remote_media(self) -> Self
pub fn allow_remote_media(self) -> Self
Let Image, Video, and AudioPlayer load https URLs. Off by
default: a surface’s media is then a data: URL or a file in the
workspace (a path relative to it, which the program serves), since a
fetch can track the user or carry data out in its URL.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Ui
impl !UnwindSafe for Ui
impl Forget for Ui
impl Freeze for Ui
impl Move for Ui
impl Send for Ui
impl Sync for Ui
impl Unpin for Ui
impl UnsafeUnpin for Ui
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
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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