pub trait Glossary: Debug {
// Required method
fn look_up(&self, name: &str) -> Option<Rc<Alias>>;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
Interface used by the parser to look up aliases
This trait is an abstract interface that represents an immutable collection of aliases. The parser uses this trait to look up aliases when it encounters a command word in a simple command.
Required Methods§
Provided Methods§
Implementations on Foreign Types§
Source§impl<T: Glossary> Glossary for RefCell<T>
Allows a glossary to be wrapped in a RefCell
.
impl<T: Glossary> Glossary for RefCell<T>
Allows a glossary to be wrapped in a RefCell
.
This implementation’s methods immutably borrow the inner glossary. If the inner glossary is mutably borrowed at the same time, it panics.