Enum extract_frontmatter::config::Splitter
source · [−]#[non_exhaustive]
pub enum Splitter {
LineIndex(usize),
DelimiterLine(String),
LinePrefix(String),
}Expand description
Ways of distinguishing front-matter from the rest of the data in some text.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
LineIndex(usize)
All lines before this line will be treated as front-matter; everything else (including this line) will be returned as data. If there are less lines than specified here, then everything will be treated as front-matter.
DelimiterLine(String)
All lines before the first line matching this text (ignoring leading and trailing whitespace differences) will be treated as front-matter; everything else (excluding this line, as it is discarded) will be returned as data. If no line is found matching this text, then everything will be treated as front-matter.
LinePrefix(String)
All lines prefixed with this text, up to (and not including) the first line that is not prefixed, will be
treated as front-matter; everything else will be returned as data. If no lines are found with this prefix, then
everything will be treated as data. Note that the prefix will not be stripped automatically; use
Modifier::StripPrefix to explicitly strip the prefix.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Splitter
impl Send for Splitter
impl Sync for Splitter
impl Unpin for Splitter
impl UnwindSafe for Splitter
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