pub struct Introspector { /* private fields */ }Expand description
A helper which allows navigating an introspected object. It remembers a path down into the guts of the object.
Implementations§
Source§impl Introspector
impl Introspector
Sourcepub fn new() -> Introspector
pub fn new() -> Introspector
Returns a new Introspector with no limit to the number of fields introspected per level
Sourcepub fn new_with(child_load_count: usize) -> Introspector
pub fn new_with(child_load_count: usize) -> Introspector
Returns a new Introspector which will not enumerate more than ‘child_load_count’ elements on each level (useful for performance reasons to stop a 1 megabyte byte array from overwhelming the user of the introspector).
Sourcepub fn num_frames(&self) -> usize
pub fn num_frames(&self) -> usize
The current number of nodes in the tree.
Sourcepub fn do_introspect(
&mut self,
object: &dyn Introspect,
navigation_command: IntrospectorNavCommand,
) -> Result<IntrospectionResult, IntrospectionError>
pub fn do_introspect( &mut self, object: &dyn Introspect, navigation_command: IntrospectorNavCommand, ) -> Result<IntrospectionResult, IntrospectionError>
Navigate the introspection tree using the given navigation_command, and also return the tree as an IntrospectionResult.
Trait Implementations§
Source§impl Clone for Introspector
impl Clone for Introspector
Source§fn clone(&self) -> Introspector
fn clone(&self) -> Introspector
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 Introspector
impl RefUnwindSafe for Introspector
impl Send for Introspector
impl Sync for Introspector
impl Unpin for Introspector
impl UnwindSafe for Introspector
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