pub struct Tag {
pub text: Arc<String>,
pub not: bool,
pub inverted: bool,
pub property: Option<Arc<String>>,
pub debug_id: DebugId,
}Expand description
Stores information about tag.
Fields§
§text: Arc<String>The text to match against.
not: boolWhether to fail when matching against text.
inverted: boolWhether to set property to true or false (inverted).
property: Option<Arc<String>>Which property to set if tag matches.
debug_id: DebugIdA debug id to track down the rule generating an error.
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn parse(
&self,
tokens: &mut Vec<Range<MetaData>>,
state: &TokenizerState,
read_token: &ReadToken<'_>,
) -> ParseResult<TokenizerState>
pub fn parse( &self, tokens: &mut Vec<Range<MetaData>>, state: &TokenizerState, read_token: &ReadToken<'_>, ) -> ParseResult<TokenizerState>
Parses tag. If the tag is linked to a property, the property will be set. If the meta reader fails setting the property the error is handled. If the token is not linked to any property, the same state will be returned.
Trait Implementations§
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
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