pub struct Settings {
pub throw_on_error: bool,
pub display_mode: bool,
pub leqno: bool,
pub error_color: String,
pub color_is_text_color: bool,
pub max_expand: usize,
pub global_group: bool,
pub macros: HashMap<String, String>,
pub macro_store: Option<Macros>,
pub strict: Strictness,
pub strict_warning_handler: Option<StrictWarningHandler>,
pub trust: TrustPolicy,
}Expand description
Parser configuration: display mode, macros, strictness, trust, and limits.
Fields§
§throw_on_error: bool§display_mode: bool§leqno: bool§error_color: String§color_is_text_color: bool§max_expand: usize§global_group: bool§macros: HashMap<String, String>§macro_store: Option<Macros>§strict: Strictness§strict_warning_handler: Option<StrictWarningHandler>§trust: TrustPolicyImplementations§
Source§impl Settings
impl Settings
pub fn new() -> Self
pub fn macro_definitions(&self) -> HashMap<String, MacroDefinition>
pub fn use_strict_behavior( &self, error_code: &str, error_message: &str, token: Option<&Token>, ) -> bool
pub fn report_nonstrict( &self, error_code: &str, error_message: &str, token: Option<&Token>, ) -> Result<(), ParseError>
pub fn is_trusted(&self, context: TrustContext) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Settings
impl !Send for Settings
impl !Sync for Settings
impl !UnwindSafe for Settings
impl Freeze for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
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