pub struct Inspector {
pub depth: usize,
pub max_depth: usize,
pub budget: usize,
pub style: InspectStyle,
pub output: String,
/* private fields */
}Expand description
Inspector manages inspection state and formatting
Fields§
§depth: usizeCurrent recursion depth
max_depth: usizeMaximum allowed depth
budget: usizeComplexity budget remaining
style: InspectStyleDisplay style configuration
output: StringOutput buffer
Implementations§
Source§impl Inspector
impl Inspector
Sourcepub fn with_style(style: InspectStyle) -> Self
pub fn with_style(style: InspectStyle) -> Self
Create an inspector with custom style
Sourcepub fn has_budget(&self) -> bool
pub fn has_budget(&self) -> bool
Check if budget allows continued inspection
Sourcepub fn consume_budget(&mut self, amount: usize)
pub fn consume_budget(&mut self, amount: usize)
Consume inspection budget
Sourcepub fn at_max_depth(&self) -> bool
pub fn at_max_depth(&self) -> bool
Check if at maximum depth
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inspector
impl RefUnwindSafe for Inspector
impl Send for Inspector
impl Sync for Inspector
impl Unpin for Inspector
impl UnwindSafe for Inspector
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
Source§impl<W> DemangleWrite for Wwhere
W: Write,
impl<W> DemangleWrite for Wwhere
W: Write,
Source§fn push_demangle_node(&mut self, _: DemangleNodeType)
fn push_demangle_node(&mut self, _: DemangleNodeType)
Called when we are entering the scope of some AST node.
Source§fn pop_demangle_node(&mut self)
fn pop_demangle_node(&mut self)
Called when we are exiting the scope of some AST node for
which
push_demangle_node was called.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<W> TomlWrite for Wwhere
W: Write,
impl<W> TomlWrite for Wwhere
W: Write,
fn open_table_header(&mut self) -> Result<(), Error>
fn close_table_header(&mut self) -> Result<(), Error>
fn open_array_of_tables_header(&mut self) -> Result<(), Error>
fn close_array_of_tables_header(&mut self) -> Result<(), Error>
fn open_inline_table(&mut self) -> Result<(), Error>
fn close_inline_table(&mut self) -> Result<(), Error>
fn open_array(&mut self) -> Result<(), Error>
fn close_array(&mut self) -> Result<(), Error>
fn key_sep(&mut self) -> Result<(), Error>
fn keyval_sep(&mut self) -> Result<(), Error>
fn key(&mut self, value: impl WriteTomlKey) -> Result<(), Error>
Source§impl<W> TomlWrite for Wwhere
W: Write,
impl<W> TomlWrite for Wwhere
W: Write,
fn open_table_header(&mut self) -> Result<(), Error>
fn close_table_header(&mut self) -> Result<(), Error>
fn open_array_of_tables_header(&mut self) -> Result<(), Error>
fn close_array_of_tables_header(&mut self) -> Result<(), Error>
fn open_inline_table(&mut self) -> Result<(), Error>
fn close_inline_table(&mut self) -> Result<(), Error>
fn open_array(&mut self) -> Result<(), Error>
fn close_array(&mut self) -> Result<(), Error>
fn key_sep(&mut self) -> Result<(), Error>
fn keyval_sep(&mut self) -> Result<(), Error>
Source§fn key(&mut self, value: impl WriteTomlKey) -> Result<(), Error>
fn key(&mut self, value: impl WriteTomlKey) -> Result<(), Error>
Write an encoded TOML key Read more
Source§fn value(&mut self, value: impl WriteTomlValue) -> Result<(), Error>
fn value(&mut self, value: impl WriteTomlValue) -> Result<(), Error>
Write an encoded TOML scalar value Read more