Struct savefile::Introspector
source · 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<'a>(
&mut self,
object: &'a dyn Introspect,
navigation_command: IntrospectorNavCommand
) -> Result<IntrospectionResult, IntrospectionError>
pub fn do_introspect<'a>( &mut self, object: &'a 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 copy 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 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