pub struct ViolationAddress { /* private fields */ }Expand description
Violation address: FILE[:BLOCK_NAME[:VALIDATOR[:HASH]]].
Only the leading FILE segment is required. Every segment left off the end widens what the
address covers. See Self::matches.
Implementations§
Source§impl ViolationAddress
impl ViolationAddress
Sourcepub fn parse(address: &str) -> Result<Self>
pub fn parse(address: &str) -> Result<Self>
Parses the ViolationAddress from string.
Sourcepub fn matches(&self, violation_address: &Self) -> bool
pub fn matches(&self, violation_address: &Self) -> bool
Whether this address, used as a --suppress argument, covers violation_address.
A segment this address leaves off covers whatever the violation has in its place, so
FILE covers every violation in the file, FILE:BLOCK_NAME every violation of that block,
and so on down to the single violation a four-segment address mentions.
Sourcepub fn covers_whole_file(&self, file: &RepoPath) -> bool
pub fn covers_whole_file(&self, file: &RepoPath) -> bool
Whether this address covers every violation in file, including the ones on unnamed blocks
that have no address of their own.
Trait Implementations§
Source§impl Clone for ViolationAddress
impl Clone for ViolationAddress
Source§fn clone(&self) -> ViolationAddress
fn clone(&self) -> ViolationAddress
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 ViolationAddress
impl Debug for ViolationAddress
Source§impl Display for ViolationAddress
impl Display for ViolationAddress
impl Eq for ViolationAddress
Source§impl Hash for ViolationAddress
impl Hash for ViolationAddress
Source§impl PartialEq for ViolationAddress
impl PartialEq for ViolationAddress
Source§impl Serialize for ViolationAddress
impl Serialize for ViolationAddress
impl StructuralPartialEq for ViolationAddress
Auto Trait Implementations§
impl Freeze for ViolationAddress
impl RefUnwindSafe for ViolationAddress
impl Send for ViolationAddress
impl Sync for ViolationAddress
impl Unpin for ViolationAddress
impl UnsafeUnpin for ViolationAddress
impl UnwindSafe for ViolationAddress
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,
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 more