pub struct QuoterOptions<'a> {
pub quote_pairs: Vec<(String, String, bool)>,
pub quoted_syntax: Vec<Syntax>,
pub unquoted_syntax: Vec<Syntax>,
pub on_quote: Option<Arc<dyn Fn(Quotable<'a>) -> String>>,
pub on_quote_expansion: Option<Arc<dyn Fn(Quotable<'a>) -> String>>,
pub replacements: HashMap<char, &'a str>,
pub replacements_expansion: HashMap<char, &'a str>,
}Expand description
Options for Quoter.
Fields§
§quote_pairs: Vec<(String, String, bool)>List of start and end quotes for strings. The boolean indicates whether the quotes should be used for expansion or not.
quoted_syntax: Vec<Syntax>List of syntax and characters that must be quoted for expansion.
unquoted_syntax: Vec<Syntax>List of syntax and characters that must not be quoted.
on_quote: Option<Arc<dyn Fn(Quotable<'a>) -> String>>Handler to apply quoting for non-expansion, typically for single quotes.
on_quote_expansion: Option<Arc<dyn Fn(Quotable<'a>) -> String>>Handler to apply quoting for expansion, typically for double quotes.
replacements: HashMap<char, &'a str>Map of characters to replace with during non-expansion, typically for escaping.
replacements_expansion: HashMap<char, &'a str>Map of characters to replace with during expansion, typically for escaping.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QuoterOptions<'a>
impl<'a> !RefUnwindSafe for QuoterOptions<'a>
impl<'a> !Send for QuoterOptions<'a>
impl<'a> !Sync for QuoterOptions<'a>
impl<'a> Unpin for QuoterOptions<'a>
impl<'a> UnsafeUnpin for QuoterOptions<'a>
impl<'a> !UnwindSafe for QuoterOptions<'a>
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