pub struct ParsingMap<Name, Value, Index> { /* private fields */ }Implementations§
Source§impl<Name: Ord, Value, Index: Id> ParsingMap<Name, Value, Index>
impl<Name: Ord, Value, Index: Id> ParsingMap<Name, Value, Index>
pub fn new() -> Self
pub fn builtin(&mut self, name: Name, range: Range<usize>, value: Value)
Sourcepub fn insert<'input, 'a, E>(
&'a mut self,
name: Once<Name>,
element: &Node<'input, 'input>,
errors: &mut Vec<E>,
) -> Option<ParsingEntry<'a, Name, Value, Index>>where
E: From<ParseError>,
pub fn insert<'input, 'a, E>(
&'a mut self,
name: Once<Name>,
element: &Node<'input, 'input>,
errors: &mut Vec<E>,
) -> Option<ParsingEntry<'a, Name, Value, Index>>where
E: From<ParseError>,
Insert named item into collection.
Raise an error if the element is missing a name.
Raise an error if there is a duplicate.
Return a mutable reference to the inserted item’s value.
The value is an Option<T> with a default of None.
Sourcepub fn insert_derived<'input, 'a, E>(
&'a mut self,
element_name: &str,
name: Name,
name_range: Range<usize>,
errors: &mut Vec<E>,
) -> Option<ParsingEntry<'a, Name, Value, Index>>where
E: From<ParseError>,
pub fn insert_derived<'input, 'a, E>(
&'a mut self,
element_name: &str,
name: Name,
name_range: Range<usize>,
errors: &mut Vec<E>,
) -> Option<ParsingEntry<'a, Name, Value, Index>>where
E: From<ParseError>,
Insert derived item into collection.
Raise an error if there is a duplicate.
Return a mutable reference to the inserted item’s value.
The value is an Option<T> with a default of None.
Sourcepub fn collect(self) -> Option<ParsedMap<Name, Value, Index>>where
Name: Clone,
pub fn collect(self) -> Option<ParsedMap<Name, Value, Index>>where
Name: Clone,
Collect all parsed items in collection sorted by name.
Return None if any where invalid.
Sourcepub fn collect_by_index(self) -> Option<ParsedMap<Name, Value, Index>>
pub fn collect_by_index(self) -> Option<ParsedMap<Name, Value, Index>>
Collect all parsed items in collection sorted by occurance (index).
Return None if any where invalid.
Sourcepub fn collect_by_key<Key, F>(
self,
key: F,
) -> Option<ParsedMap<Name, Value, Index>>
pub fn collect_by_key<Key, F>( self, key: F, ) -> Option<ParsedMap<Name, Value, Index>>
Collect all parsed items in collection sorted by function.
Return None if any where invalid.
Sourcepub fn collect_to_btree(self) -> Option<BTreeMap<Name, Value>>where
Name: Clone,
pub fn collect_to_btree(self) -> Option<BTreeMap<Name, Value>>where
Name: Clone,
Collect all parsed items in collection to a b-tree
Return None if any where invalid.
Auto Trait Implementations§
impl<Name, Value, Index> Freeze for ParsingMap<Name, Value, Index>where
Index: Freeze,
impl<Name, Value, Index> RefUnwindSafe for ParsingMap<Name, Value, Index>
impl<Name, Value, Index> Send for ParsingMap<Name, Value, Index>
impl<Name, Value, Index> Sync for ParsingMap<Name, Value, Index>
impl<Name, Value, Index> Unpin for ParsingMap<Name, Value, Index>where
Index: Unpin,
impl<Name, Value, Index> UnwindSafe for ParsingMap<Name, Value, Index>
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
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more