Struct opg::table::OpTable [−][src]
A struct of Operation Table.
Fields
table: HashMap<(String, String), char>
The hashmap of relation.
ts: HashSet<String>
The terminal set in the grammar.
Implementations
impl OpTable
[src]
pub fn new(ts: HashSet<String>) -> OpTable
[src]
Create a new opTable
.
pub fn insert(&mut self, ttuple: &(String, String), ch: char)
[src]
Insert to table.
Principles
Try to insert the a tuple with ch
relation.
If it is occupied and not equal to the relation
to be inserted, then the grammar is ambiguous
and the panic will be fired.
pub fn to_string(&self) -> String
[src]
Convert table to string.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for OpTable
[src]
impl Send for OpTable
[src]
impl Sync for OpTable
[src]
impl Unpin for OpTable
[src]
impl UnwindSafe for OpTable
[src]
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,
pub 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> 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.
pub 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>,