pub enum SuppressionKind {
Off,
On,
Skip,
}Variants§
Off
A fmt: off or yapf: disable comment
On
A fmt: on or yapf: enable comment
Skip
A fmt: skip comment
Implementations§
Source§impl SuppressionKind
impl SuppressionKind
Sourcepub fn from_comment(comment: &str) -> Option<Self>
pub fn from_comment(comment: &str) -> Option<Self>
Attempts to identify the kind of a comment.
The comment string should be the full line with the comment on it.
Sourcepub fn is_suppression_on(slice: &str, position: CommentLinePosition) -> bool
pub fn is_suppression_on(slice: &str, position: CommentLinePosition) -> bool
Returns true if this comment is a fmt: off or yapf: disable own line suppression comment.
Sourcepub fn is_suppression_off(slice: &str, position: CommentLinePosition) -> bool
pub fn is_suppression_off(slice: &str, position: CommentLinePosition) -> bool
Returns true if this comment is a fmt: on or yapf: enable own line suppression comment.
Trait Implementations§
Source§impl Clone for SuppressionKind
impl Clone for SuppressionKind
Source§fn clone(&self) -> SuppressionKind
fn clone(&self) -> SuppressionKind
Returns a duplicate 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 moreSource§impl Debug for SuppressionKind
impl Debug for SuppressionKind
Source§impl PartialEq for SuppressionKind
impl PartialEq for SuppressionKind
impl Copy for SuppressionKind
impl Eq for SuppressionKind
impl StructuralPartialEq for SuppressionKind
Auto Trait Implementations§
impl Freeze for SuppressionKind
impl RefUnwindSafe for SuppressionKind
impl Send for SuppressionKind
impl Sync for SuppressionKind
impl Unpin for SuppressionKind
impl UnsafeUnpin for SuppressionKind
impl UnwindSafe for SuppressionKind
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> 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