Enum extract_frontmatter::config::Modifier
source · [−]#[non_exhaustive]
pub enum Modifier<'opt> {
StripFirstLine,
StripLastLine,
StripPrefix(&'opt str),
TrimWhitespace,
}Expand description
Modifiers that can be applied to extracted front-matter. Note that these will implicitly normalise newlines to just
\n (LF).
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
StripFirstLine
Strip the first line from the front-matter returned.
StripLastLine
Strip the last line from the front-matter returned.
StripPrefix(&'opt str)
Strips the given prefix from the start of all front-matter lines.
TrimWhitespace
Strip leading and trailing whitespace from all front-matter lines.
Trait Implementations
Auto Trait Implementations
impl<'opt> RefUnwindSafe for Modifier<'opt>
impl<'opt> Send for Modifier<'opt>
impl<'opt> Sync for Modifier<'opt>
impl<'opt> Unpin for Modifier<'opt>
impl<'opt> UnwindSafe for Modifier<'opt>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more