[−][src]Struct abnf::types::Rule
A single ABNF rule with a name, it's definition (implemented as Node
) and a kind (Kind::Basic
or Kind::Incremental
).
Methods
impl Rule
[src]
pub fn new(name: &str, node: Node) -> Rule
[src]
Construct a basic rule.
pub fn incremental(name: &str, node: Node) -> Rule
[src]
Construct an incremental rule.
pub fn get_name(&self) -> &str
[src]
use .name()
instead. get_
prefix should not be used here (API guidelines)
Get the name of the rule.
pub fn name(&self) -> &str
[src]
Get the name of the rule.
pub fn get_node(&self) -> &Node
[src]
use .node()
instead. get_
prefix should not be used here (API guidelines)
Get the definition of the rule. Implemented as a composition of Node
s.
pub fn node(&self) -> &Node
[src]
Get the definition of the rule. Implemented as a composition of Node
s.
pub fn get_kind(&self) -> Kind
[src]
use .kind()
instead. get_
prefix should not be used here (API guidelines)
Get the kind of the rule, i.e. Basic
or Incremental
.
pub fn kind(&self) -> Kind
[src]
Get the kind of the rule, i.e. Basic
or Incremental
.
Trait Implementations
impl Clone for Rule
[src]
impl Debug for Rule
[src]
impl Display for Rule
[src]
impl Eq for Rule
[src]
impl PartialEq<Rule> for Rule
[src]
impl StructuralEq for Rule
[src]
impl StructuralPartialEq for Rule
[src]
Auto Trait Implementations
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,