Skip to main content

StateReader

Trait StateReader 

Source
pub trait StateReader {
    type Place: StatePlace;

    // Required methods
    fn list_len(&self, place: &Self::Place) -> Option<usize>;
    fn holds_text(&self, place: &Self::Place, text: &str) -> bool;
}
Expand description

Reading an app’s state, for finding where a download’s id went.

Required Associated Types§

Required Methods§

Source

fn list_len(&self, place: &Self::Place) -> Option<usize>

How many items the list at place has; None when there’s no such place.

Source

fn holds_text(&self, place: &Self::Place, text: &str) -> bool

Whether the text at place is text; false when there’s no such place.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§