pub struct Locator { /* private fields */ }Expand description
A lazy query resolved against the current terminal grid before every read, wait, or action.
Implementations§
Source§impl Locator
impl Locator
pub fn query(&self) -> &LocatorQuery
Sourcepub fn and(&self, other: &Self) -> Result<Self, TuiTestError>
pub fn and(&self, other: &Self) -> Result<Self, TuiTestError>
Intersect selected cells and form contiguous per-row runs.
Sourcepub fn or(&self, other: &Self) -> Result<Self, TuiTestError>
pub fn or(&self, other: &Self) -> Result<Self, TuiTestError>
Union selected cells and form contiguous per-row runs.
pub fn filter( &self, options: LocatorFilterOptions, ) -> Result<Self, TuiTestError>
Sourcepub fn get_by_link(&self, selector: impl Into<LinkSelector>) -> Self
pub fn get_by_link(&self, selector: impl Into<LinkSelector>) -> Self
Require every cell of each current match to have this link.
pub fn get_by_link_relative( &self, selector: impl Into<LinkSelector>, direction: LocatorDirection, ) -> Self
pub fn get_by_text(&self, selector: impl Into<TextSelector>) -> Self
pub fn get_by_text_relative( &self, selector: impl Into<TextSelector>, direction: LocatorDirection, ) -> Self
pub fn get_by_style(&self, selector: impl Into<StyleSelector>) -> Self
pub fn get_by_style_relative( &self, selector: impl Into<StyleSelector>, direction: LocatorDirection, ) -> Self
pub fn any(&self) -> Self
pub fn unique(&self) -> Self
pub fn first(&self) -> Self
pub fn last(&self) -> Self
pub fn nth(&self, index: usize) -> Self
pub fn all(&self) -> Result<Vec<Self>, TuiTestError>
pub fn count(&self) -> Result<usize, TuiTestError>
pub fn locations(&self) -> Result<Vec<TextMatch>, TuiTestError>
pub fn location(&self) -> Result<TextMatch, TuiTestError>
pub fn wait(&self) -> Result<(), TuiTestError>
pub fn wait_with_timeout( &self, timeout_ms: Option<u64>, ) -> Result<(), TuiTestError>
pub fn click(&self) -> Result<(), TuiTestError>
pub fn click_with( &self, options: LocatorClickOptions, ) -> Result<(), TuiTestError>
pub fn highlight(&self) -> Result<(), TuiTestError>
pub fn highlight_with_timeout( &self, timeout_ms: Option<u64>, ) -> Result<(), TuiTestError>
pub fn expect(&self) -> Result<(), TuiTestError>
pub fn expect_with( &self, options: LocatorExpectOptions, ) -> Result<(), TuiTestError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Locator
impl RefUnwindSafe for Locator
impl Send for Locator
impl Sync for Locator
impl Unpin for Locator
impl UnsafeUnpin for Locator
impl UnwindSafe for Locator
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,
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.