pub enum Policy {
Safe,
Legal,
All,
}Expand description
Which comments survive by default.
A policy is the last word, not the first: ScanOptions::keep_kinds,
ScanOptions::keep_regex, ScanOptions::remove_kinds and
ScanOptions::remove_regex are all tested before it. The full table of
policy against CommentKind is in the crate documentation.
Variants§
Safe
The default. Removes ordinary, documentation, and license comments; keeps directives, HTML comments, SQL hints and version comments, and the shebang or encoding preamble.
Legal
As Self::Safe, but license and copyright notices are kept too.
All
Removes every comment, directives and HTML comments included. The
shebang and encoding preamble still survive unless
ScanOptions::force_protected is set.
Implementations§
Trait Implementations§
impl Copy for Policy
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
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 Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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