Struct term_rewriting::Operator[][src]

pub struct Operator { /* fields omitted */ }

A symbol with fixed arity. Only carries meaning alongside a Signature.

To construct an Operator, use Signature::new_op.

Methods

impl Operator
[src]

Returns an Operator's arity.

Examples

let mut sig = Signature::default();
let op = sig.new_op(2, Some("Z".to_string()));
assert_eq!(op.arity(&sig), 2);

Returns an Operator's name.

Examples

let mut sig = Signature::default();
let op = sig.new_op(2, Some("Z".to_string()));
assert_eq!(op.name(&sig), Some("Z"));

Returns a human-readable, string representation of an Operator.

Examples

let mut sig = Signature::default();
let op = sig.new_op(2, Some("Z".to_string()));
assert_eq!(op.display(&sig), "Z");

Trait Implementations

impl Debug for Operator
[src]

Formats the value using the given formatter. Read more

impl Copy for Operator
[src]

impl Clone for Operator
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Operator
[src]

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

This method tests for !=.

impl Eq for Operator
[src]

impl Hash for Operator
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl From<Operator> for Atom
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Operator

impl Sync for Operator