pub struct ProtectedPattern {
pub contains: String,
pub reason: String,
}Expand description
A substring that makes a comment a kept directive.
A comment whose text contains it is recorded as a
CommentKind::Directive, which every policy but
Policy::All keeps, and reason becomes the reason
on its Disposition::Keep.
Fields§
§contains: StringThe substring to look for, compared against the comment’s text as lossy UTF-8.
reason: StringWhy such a comment is kept, phrased for a human. It must not be blank.
Trait Implementations§
Source§impl Clone for ProtectedPattern
impl Clone for ProtectedPattern
Source§fn clone(&self) -> ProtectedPattern
fn clone(&self) -> ProtectedPattern
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 ProtectedPattern
impl Debug for ProtectedPattern
Source§impl<'de> Deserialize<'de> for ProtectedPattern
impl<'de> Deserialize<'de> for ProtectedPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProtectedPattern
Source§impl PartialEq for ProtectedPattern
impl PartialEq for ProtectedPattern
Source§impl Serialize for ProtectedPattern
impl Serialize for ProtectedPattern
impl StructuralPartialEq for ProtectedPattern
Auto Trait Implementations§
impl Freeze for ProtectedPattern
impl RefUnwindSafe for ProtectedPattern
impl Send for ProtectedPattern
impl Sync for ProtectedPattern
impl Unpin for ProtectedPattern
impl UnsafeUnpin for ProtectedPattern
impl UnwindSafe for ProtectedPattern
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