Struct rail_lang::rail_machine::RailState
source · [−]pub struct RailState {
pub quote: Quote,
pub dictionary: Dictionary,
pub context: Context,
}
Fields
quote: Quote
dictionary: Dictionary
context: Context
Implementations
sourceimpl RailState
impl RailState
pub fn new(context: Context) -> RailState
pub fn in_main(&self) -> bool
pub fn run_tokens(self, tokens: Vec<String>) -> RailState
pub fn run_term<S>(self, term: S) -> RailState where
S: Into<String>,
pub fn update_quote(self, update: impl Fn(Quote) -> Quote) -> RailState
pub fn update_quote_and_dict(
self,
update: impl Fn(Quote, Dictionary) -> (Quote, Dictionary)
) -> RailState
pub fn replace_quote(self, quote: Quote) -> RailState
pub fn replace_dictionary(self, dictionary: Dictionary) -> RailState
sourcepub fn jail_state(&self, quote: Quote) -> RailState
pub fn jail_state(&self, quote: Quote) -> RailState
A substate that will take a parent dictionary, but never leak its own dictionary to parent contexts.
pub fn deeper(self) -> RailState
pub fn higher(self) -> RailState
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RailState
impl !Send for RailState
impl !Sync for RailState
impl Unpin for RailState
impl !UnwindSafe for RailState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more