Struct piston_meta::meta_rules::Tag [] [src]

pub struct Tag {
    pub text: Arc<String>,
    pub not: bool,
    pub inverted: bool,
    pub property: Option<Arc<String>>,
    pub debug_id: DebugId,
}

Stores information about tag.

Fields

text: Arc<String>

The text to match against.

not: bool

Whether to fail when matching against text.

inverted: bool

Whether to set property to true or false (inverted).

property: Option<Arc<String>>

Which property to set if tag matches.

debug_id: DebugId

A debug id to track down the rule generating an error.

Methods

impl Tag
[src]

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 PartialEq for Tag
[src]

fn eq(&self, __arg_0: &Tag) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Tag) -> bool

This method tests for !=.

impl Debug for Tag
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Tag
[src]

fn clone(&self) -> Tag

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more