pub struct WriteReport { /* private fields */ }Expand description
Everything a writer adjusted. Mirrors Python’s WriteReport: truthy
(see WriteReport::is_ok) when there are no error-severity entries –
warnings alone are fine.
Implementations§
Source§impl WriteReport
impl WriteReport
Sourcepub fn add(
&mut self,
path: impl Into<String>,
code: impl Into<String>,
message: impl Into<String>,
severity: Severity,
)
pub fn add( &mut self, path: impl Into<String>, code: impl Into<String>, message: impl Into<String>, severity: Severity, )
Record one adjustment.
Sourcepub fn adjustments(&self) -> &[Adjustment]
pub fn adjustments(&self) -> &[Adjustment]
All recorded adjustments, in the order they were added.
Sourcepub fn warnings(&self) -> Vec<&Adjustment>
pub fn warnings(&self) -> Vec<&Adjustment>
Only the Warning-severity adjustments.
Sourcepub fn errors(&self) -> Vec<&Adjustment>
pub fn errors(&self) -> Vec<&Adjustment>
Only the Error-severity adjustments.
Sourcepub fn is_ok(&self) -> bool
pub fn is_ok(&self) -> bool
Python’s __bool__: true (safe) iff there are no error-severity
entries – warnings alone don’t flip this.
Sourcepub fn iter(&self) -> Iter<'_, Adjustment>
pub fn iter(&self) -> Iter<'_, Adjustment>
Iterator over all recorded adjustments.
Trait Implementations§
Source§impl Clone for WriteReport
impl Clone for WriteReport
Source§fn clone(&self) -> WriteReport
fn clone(&self) -> WriteReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WriteReport
impl Debug for WriteReport
Source§impl Default for WriteReport
impl Default for WriteReport
Source§fn default() -> WriteReport
fn default() -> WriteReport
Returns the “default value” for a type. Read more
Source§impl Display for WriteReport
impl Display for WriteReport
impl Eq for WriteReport
Source§impl<'a> IntoIterator for &'a WriteReport
impl<'a> IntoIterator for &'a WriteReport
Source§impl PartialEq for WriteReport
impl PartialEq for WriteReport
Source§fn eq(&self, other: &WriteReport) -> bool
fn eq(&self, other: &WriteReport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WriteReport
Auto Trait Implementations§
impl Freeze for WriteReport
impl RefUnwindSafe for WriteReport
impl Send for WriteReport
impl Sync for WriteReport
impl Unpin for WriteReport
impl UnsafeUnpin for WriteReport
impl UnwindSafe for WriteReport
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more