pub struct TestingRunner { /* private fields */ }Implementations§
Source§impl TestingRunner
impl TestingRunner
pub fn new<T>( app: impl Into<AppComponent>, size: Size2D, hook: impl FnOnce(&mut Runner) -> T, scale_factor: f64, ) -> (Self, T)
pub fn set_fonts(&mut self, fonts: HashMap<&str, &[u8]>)
pub fn set_default_fonts(&mut self, fonts: &[Cow<'static, str>])
pub async fn handle_events(&mut self)
pub fn handle_events_immediately(&mut self)
pub fn sync_and_update(&mut self)
Sourcepub fn poll(&mut self, step: Duration, duration: Duration)
pub fn poll(&mut self, step: Duration, duration: Duration)
Poll async tasks and events every step time for a total time of duration.
This is useful for animations for instance.
Sourcepub fn poll_n(&mut self, step: Duration, times: u32)
pub fn poll_n(&mut self, step: Duration, times: u32)
Poll async tasks and events every step, N times.
This is useful for animations for instance.
pub fn send_event(&mut self, platform_event: PlatformEvent)
pub fn move_cursor(&mut self, cursor: impl Into<CursorPoint>)
pub fn write_text(&mut self, text: impl ToString)
pub fn press_key(&mut self, key: Key)
pub fn press_cursor(&mut self, cursor: impl Into<CursorPoint>)
pub fn release_cursor(&mut self, cursor: impl Into<CursorPoint>)
pub fn click_cursor(&mut self, cursor: impl Into<CursorPoint>)
pub fn scroll( &mut self, cursor: impl Into<CursorPoint>, scroll: impl Into<CursorPoint>, )
pub fn animation_clock(&mut self) -> &mut AnimationClock
pub fn render(&mut self) -> SkData
pub fn render_to_file(&mut self, path: impl Into<PathBuf>)
pub fn find<T>( &self, matcher: impl Fn(TestingNode, &dyn ElementExt) -> Option<T>, ) -> Option<T>
pub fn find_many<T>( &self, matcher: impl Fn(TestingNode, &dyn ElementExt) -> Option<T>, ) -> Vec<T>
Auto Trait Implementations§
impl Freeze for TestingRunner
impl !RefUnwindSafe for TestingRunner
impl !Send for TestingRunner
impl !Sync for TestingRunner
impl Unpin for TestingRunner
impl UnsafeUnpin for TestingRunner
impl !UnwindSafe for TestingRunner
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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