pub enum AgentCapability {
Show 23 variants
Focusable,
Clickable,
Scrollable {
vertical: bool,
horizontal: bool,
},
TextInput {
multiline: bool,
max_length: Option<usize>,
},
Selectable {
multi_select: bool,
item_count: usize,
},
Expandable {
expanded: bool,
},
Draggable,
DropTarget,
Resizable {
min_width: Option<f32>,
min_height: Option<f32>,
max_width: Option<f32>,
max_height: Option<f32>,
},
Animated {
playing: bool,
},
RangeEditable {
min: f64,
max: f64,
step: Option<f64>,
},
Toggleable {
state: bool,
},
Sortable {
columns: Vec<String>,
},
Filterable,
Searchable,
Copyable,
HasTooltip,
HasKeyBindings {
bindings: Vec<(String, String)>,
},
Minimizable,
Maximizable,
Closable,
Zoomable {
min_zoom: f32,
max_zoom: f32,
},
Custom(String),
}Expand description
A capability that a widget instance advertises.
Agents query capabilities to understand what interactions are possible with a given widget without trial-and-error.
Variants§
Focusable
Widget can receive keyboard focus.
Clickable
Widget responds to mouse clicks.
Scrollable
Widget can be scrolled (vertical, horizontal, or both).
TextInput
Widget accepts text input.
Selectable
Widget supports item selection (single or multi).
Expandable
Widget can be expanded or collapsed.
Draggable
Widget supports drag-and-drop as a source.
DropTarget
Widget acts as a drop target.
Resizable
Widget supports resizing by the user.
Fields
Animated
Widget has an animation in progress.
RangeEditable
Widget supports value editing within a range.
Toggleable
Widget can be toggled on/off.
Sortable
Widget supports sorting.
Filterable
Widget supports filtering.
Searchable
Widget supports search.
Copyable
Widget supports copy-to-clipboard.
HasTooltip
Widget provides hover tooltips.
HasKeyBindings
Widget supports keyboard shortcuts.
Minimizable
Widget can be minimized.
Maximizable
Widget can be maximized.
Closable
Widget can be closed.
Zoomable
Widget supports pinch-to-zoom.
Custom(String)
Custom capability with a name tag.
Implementations§
Trait Implementations§
Source§impl Clone for AgentCapability
impl Clone for AgentCapability
Source§fn clone(&self) -> AgentCapability
fn clone(&self) -> AgentCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentCapability
impl Debug for AgentCapability
Source§impl<'de> Deserialize<'de> for AgentCapability
impl<'de> Deserialize<'de> for AgentCapability
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>,
Source§impl PartialEq for AgentCapability
impl PartialEq for AgentCapability
Source§fn eq(&self, other: &AgentCapability) -> bool
fn eq(&self, other: &AgentCapability) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentCapability
impl Serialize for AgentCapability
impl StructuralPartialEq for AgentCapability
Auto Trait Implementations§
impl Freeze for AgentCapability
impl RefUnwindSafe for AgentCapability
impl Send for AgentCapability
impl Sync for AgentCapability
impl Unpin for AgentCapability
impl UnsafeUnpin for AgentCapability
impl UnwindSafe for AgentCapability
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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