pub enum ViewKeyResolveError {
Missing {
key: String,
},
Duplicate {
key: String,
count: usize,
},
}Expand description
Error resolving a view key (View::key) in the element tree.
The requested key is owned by the error so it remains useful after the tree borrow ends. Duplicate counts include all string/static keys equal to the requested text; numeric keys are never matched by this API.
§Examples
use ailloli_ui_runtime::element::ViewKeyResolveError;
let error = ViewKeyResolveError::Missing { key: String::from("search") };
assert!(matches!(error, ViewKeyResolveError::Missing { key } if key == "search"));Variants§
Missing
No retained string/static key matched.
Duplicate
More than one retained string/static key matched.
Trait Implementations§
Source§impl Clone for ViewKeyResolveError
impl Clone for ViewKeyResolveError
Source§fn clone(&self) -> ViewKeyResolveError
fn clone(&self) -> ViewKeyResolveError
Returns a copy of the value. Read more
1.0.0 · 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 ViewKeyResolveError
impl Debug for ViewKeyResolveError
Source§impl PartialEq for ViewKeyResolveError
impl PartialEq for ViewKeyResolveError
impl Eq for ViewKeyResolveError
impl StructuralPartialEq for ViewKeyResolveError
Auto Trait Implementations§
impl Freeze for ViewKeyResolveError
impl RefUnwindSafe for ViewKeyResolveError
impl Send for ViewKeyResolveError
impl Sync for ViewKeyResolveError
impl Unpin for ViewKeyResolveError
impl UnwindSafe for ViewKeyResolveError
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.