pub struct MockComponent {
pub name: String,
pub html: String,
pub classes: HashSet<String>,
pub custom_properties: HashMap<String, String>,
pub props: HashMap<String, String>,
}Expand description
A mock component for testing
Fields§
§name: String§html: String§classes: HashSet<String>§custom_properties: HashMap<String, String>§props: HashMap<String, String>Implementations§
Source§impl MockComponent
impl MockComponent
Sourcepub fn with_class(self, class: impl Into<String>) -> Self
pub fn with_class(self, class: impl Into<String>) -> Self
Add a CSS class
Sourcepub fn with_classes(self, classes: impl IntoIterator<Item = String>) -> Self
pub fn with_classes(self, classes: impl IntoIterator<Item = String>) -> Self
Add multiple CSS classes
Trait Implementations§
Source§impl Clone for MockComponent
impl Clone for MockComponent
Source§fn clone(&self) -> MockComponent
fn clone(&self) -> MockComponent
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 MockComponent
impl RefUnwindSafe for MockComponent
impl Send for MockComponent
impl Sync for MockComponent
impl Unpin for MockComponent
impl UnwindSafe for MockComponent
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