Enum panopticon_core::disassembler::Rule [] [src]

pub enum Rule<A: Architecture> {
    Terminal {
        mask: A::Token,
        pattern: A::Token,
        capture_group: Vec<(String, A::Token)>,
    },
    Sub(Arc<Disassembler<A>>),
}

Single matching rule.

Variants

Matches a fixed set of bits of a single token

Fields of Terminal

Bit mask of all fixed bits in the pattern

Bit pattern we are looking for

Pair of capture group name and bit mask

Matches one of the sub-disassemblers' rules

Trait Implementations

impl<A: Clone + Architecture> Clone for Rule<A> where
    A::Token: Clone,
    A::Token: Clone,
    A::Token: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<A: Architecture> PartialEq for Rule<A>
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl<A: Architecture> Into<Rule<A>> for usize
[src]

[src]

Performs the conversion.

impl<A: Architecture> From<Arc<Disassembler<A>>> for Rule<A>
[src]

[src]

Performs the conversion.

impl<'a, A: Architecture> Into<Rule<A>> for &'a str
[src]

[src]

Performs the conversion.