pub struct MockRenderer { /* private fields */ }
Implementations§
Source§impl MockRenderer
impl MockRenderer
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
Source§impl MockRenderer
impl MockRenderer
Sourcepub fn expect_render_target_is_enabled(&mut self) -> &mut Expectation
pub fn expect_render_target_is_enabled(&mut self) -> &mut Expectation
Create an Expectation
for mocking the render_target_is_enabled
method
Sourcepub fn expect_set_render_target_enabled(&mut self) -> &mut Expectation
pub fn expect_set_render_target_enabled(&mut self) -> &mut Expectation
Create an Expectation
for mocking the set_render_target_enabled
method
Sourcepub fn expect_draw_pixel(&mut self) -> &mut Expectation
pub fn expect_draw_pixel(&mut self) -> &mut Expectation
Create an Expectation
for mocking the draw_pixel
method
Sourcepub fn expect_flush(&mut self) -> &mut Expectation
pub fn expect_flush(&mut self) -> &mut Expectation
Create an Expectation
for mocking the flush
method
Trait Implementations§
Source§impl Debug for MockRenderer
impl Debug for MockRenderer
Source§impl Default for MockRenderer
impl Default for MockRenderer
Source§impl Renderer for MockRenderer
impl Renderer for MockRenderer
fn render_target_is_enabled(&self, target: RenderTarget) -> bool
fn set_render_target_enabled(&mut self, target: RenderTarget, enabled: bool)
fn draw_pixel( &mut self, x: usize, y: usize, z: u8, color: Color, target: RenderTarget, )
fn flush(&mut self)
Auto Trait Implementations§
impl Freeze for MockRenderer
impl RefUnwindSafe for MockRenderer
impl Send for MockRenderer
impl Sync for MockRenderer
impl Unpin for MockRenderer
impl UnwindSafe for MockRenderer
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> 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