pub struct WarningCollector { /* private fields */ }Expand description
Collects warnings during conversion
Implementations§
Source§impl WarningCollector
impl WarningCollector
pub fn new() -> Self
pub fn with_limit(limit: usize) -> Self
Sourcepub fn add(&mut self, warning: ConvertWarning)
pub fn add(&mut self, warning: ConvertWarning)
Add a warning
Sourcepub fn warnings(&self) -> &[ConvertWarning]
pub fn warnings(&self) -> &[ConvertWarning]
Get all collected warnings
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Check if any warnings were collected
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Print summary of warnings
Trait Implementations§
Source§impl Debug for WarningCollector
impl Debug for WarningCollector
Source§impl Default for WarningCollector
impl Default for WarningCollector
Source§fn default() -> WarningCollector
fn default() -> WarningCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WarningCollector
impl RefUnwindSafe for WarningCollector
impl Send for WarningCollector
impl Sync for WarningCollector
impl Unpin for WarningCollector
impl UnwindSafe for WarningCollector
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more