`GroupConfig`: Added some documentation explaining fields & defaults.

Fortune for rematch's current commit: Half curse − 半凶
old-interface-extra-help-info
Avril 2 weeks ago
parent 3b1299c176
commit 8d7f9399d2
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -65,10 +65,21 @@ fn initialise() -> eyre::Result<()>
Ok(()) Ok(())
} }
/// Provides the group output writer with references to the byte-strings to be used to delimit single groups' output & to delimit each input string (or line)'s output.
///
/// The defaults are `\n` (LF-literal) for [line_delimiter], and `\t` for [field_delimiter], see the fields for more information.
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord/*, Copy*/)] #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord/*, Copy*/)]
pub struct GroupConfig<'a> pub struct GroupConfig<'a>
{ {
/// Delimits the output of each individual input string.
///
/// By default, this is a newline `\n` character.
pub line_delimiter: &'a [u8], pub line_delimiter: &'a [u8],
/// Delimits the output of each requested capture group (per [line_delimiter].)
/// If there is only 1 (or less) requested groups (that may be *empty/unmatched*, are **not** *invalid*,)
/// then there is no field delimit for that individual output string line.
///
/// By default, this is a tab literal `\t` character.
pub field_delimiter: &'a [u8], pub field_delimiter: &'a [u8],
} }

Loading…
Cancel
Save