pub struct MockComponentInputs { /* private fields */ }Expand description
Used during tests to mock the component’s inputs.
Implementations§
Source§impl MockComponentInputs
impl MockComponentInputs
Sourcepub fn set_text_input(
&self,
text_input: impl FnMut(TextInputId) -> String + 'static,
)
pub fn set_text_input( &self, text_input: impl FnMut(TextInputId) -> String + 'static, )
Set the function that return a text input.
Sourcepub fn component_inputs(&self) -> ComponentInputs
pub fn component_inputs(&self) -> ComponentInputs
Create a ComponentInputs that uses this MockComponentInputs.
Trait Implementations§
Source§impl Clone for MockComponentInputs
impl Clone for MockComponentInputs
Source§fn clone(&self) -> MockComponentInputs
fn clone(&self) -> MockComponentInputs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MockComponentInputs
impl RefUnwindSafe for MockComponentInputs
impl !Send for MockComponentInputs
impl !Sync for MockComponentInputs
impl Unpin for MockComponentInputs
impl UnsafeUnpin for MockComponentInputs
impl UnwindSafe for MockComponentInputs
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