Struct rbx_dom_weak::DomViewer
source · pub struct DomViewer { /* private fields */ }
Expand description
Contains state for viewing and redacting nondeterministic portions of WeakDom objects, making them suitable for usage in snapshot tests.
DomViewer
can be held onto and used with a DOM multiple times. IDs will
persist when viewing the same instance multiple times, and should stay the
same across multiple runs of a test.
Implementations§
source§impl DomViewer
impl DomViewer
sourcepub fn view(&mut self, dom: &WeakDom) -> ViewedInstance
pub fn view(&mut self, dom: &WeakDom) -> ViewedInstance
View the given WeakDom
, creating a ViewedInstance
object that can be
used in a snapshot test.
sourcepub fn view_children(&mut self, dom: &WeakDom) -> Vec<ViewedInstance>
pub fn view_children(&mut self, dom: &WeakDom) -> Vec<ViewedInstance>
View the children of the root instance of the given WeakDom
, returning
them as a Vec<ViewedInstance>
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DomViewer
impl Send for DomViewer
impl Sync for DomViewer
impl Unpin for DomViewer
impl UnwindSafe for DomViewer
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