pub struct TestingRunner { /* private fields */ }Implementations§
Source§impl TestingRunner
impl TestingRunner
pub fn new<T>( app: impl Into<FpRender>, size: Size2D, hook: impl FnOnce(&mut Runner) -> T, ) -> (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.
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 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 !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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§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