Skip to main content

Options

Struct Options 

Source
pub struct Options {
Show 33 fields pub safe: SafeOptions, pub fixed: FixedOptions, pub space: SpaceOptions, pub text: TextOptions, pub number: NumberOptions, pub string: StringOptions, pub line: LineOptions, pub comment: CommentOptions, pub value: ValueOptions, pub ender: Vec<String>, pub map: MapOptions, pub list: ListOptions, pub info: InfoOptions, pub lex: LexOptions, pub rewind: RewindOptions, pub rule: RuleOptions, pub result: ResultOptions, pub parse: ParseOptions, pub parser: ParserOptions, pub debug: DebugOptions, pub plugin: IndexMap<String, Value>, pub token_set: HashMap<String, Vec<Tin>>, pub tokens: IndexMap<String, Tin>, pub match_lex: bool, pub match_check: Option<LexCheck>, pub match_tokens: IndexMap<String, MatchToken>, pub match_values: IndexMap<String, MatchValue>, pub error: HashMap<String, String>, pub hint: HashMap<String, String>, pub errmsg: ErrMsgOptions, pub color: ColorOptions, pub config_modify: IndexMap<String, ConfigModifier>, pub tag: String,
}

Fields§

§safe: SafeOptions§fixed: FixedOptions§space: SpaceOptions§text: TextOptions§number: NumberOptions§string: StringOptions§line: LineOptions§comment: CommentOptions§value: ValueOptions§ender: Vec<String>§map: MapOptions§list: ListOptions§info: InfoOptions§lex: LexOptions§rewind: RewindOptions§rule: RuleOptions§result: ResultOptions§parse: ParseOptions§parser: ParserOptions§debug: DebugOptions§plugin: IndexMap<String, Value>

Per-plugin accumulated option bags (options.plugin).

§token_set: HashMap<String, Vec<Tin>>§tokens: IndexMap<String, Tin>

Named token identities without an attached built-in, fixed, or match producer. Serialized rule slots allocate these on first reference.

§match_lex: bool

Enable serialized/custom regexp token matching (options.match.lex).

§match_check: Option<LexCheck>§match_tokens: IndexMap<String, MatchToken>§match_values: IndexMap<String, MatchValue>§error: HashMap<String, String>§hint: HashMap<String, String>§errmsg: ErrMsgOptions§color: ColorOptions§config_modify: IndexMap<String, ConfigModifier>§tag: String

Implementations§

Source§

impl Options

Source

pub fn refresh_configuration(&mut self) -> Result<(), String>

Rebuild the resolved configuration callbacks from this option tree. Config modifiers run before matcher factories, matching canonical configure: factories must observe the modifier’s final values.

Source

pub fn refresh_lex_matchers(&mut self) -> Result<(), String>

Rebuild setup-time lexer matchers from the fully resolved option tree. Factories run once per configuration/derivation, not once per parse.

Source

pub fn empty() -> Self

Baseline for Tabnas::empty: no standard token producers or token sets. Structural and diagnostic fields retain typed values so plugins can opt individual facilities back in without handling missing data.

Source

pub fn is_ignored(&self, tin: Tin) -> bool

Source

pub fn token(&self, name: &str) -> Option<Tin>

Source

pub fn register_token(&mut self, name: impl Into<String>) -> Tin

Source

pub fn next_tin(&self) -> Tin

Source

pub fn token_name(&self, tin: Tin) -> String

Trait Implementations§

Source§

impl Clone for Options

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Options

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Options

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.