Struct rail_lang::rail_machine::RailDef
source · [−]pub struct RailDef<'a> {
pub name: String,
/* private fields */
}
Fields
name: String
Implementations
sourceimpl RailDef<'_>
impl RailDef<'_>
pub fn on_state<'a, F>(
name: &str,
consumes: &'a [&'a str],
produces: &'a [&'a str],
state_action: F
) -> RailDef<'a> where
F: Fn(RailState) -> RailState + 'a,
pub fn on_jailed_state<'a, F>(
name: &str,
consumes: &'a [&'a str],
produces: &'a [&'a str],
state_action: F
) -> RailDef<'a> where
F: Fn(RailState) -> RailState + 'a,
pub fn on_quote<'a, F>(
name: &str,
consumes: &'a [&'a str],
produces: &'a [&'a str],
quote_action: F
) -> RailDef<'a> where
F: Fn(Quote) -> Quote + 'a,
pub fn contextless<'a, F>(
name: &str,
consumes: &'a [&'a str],
produces: &'a [&'a str],
contextless_action: F
) -> RailDef<'a> where
F: Fn() + 'a,
pub fn from_quote<'a>(name: &str, quote: Quote) -> RailDef<'a>
pub fn act(&mut self, state: RailState) -> RailState
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for RailDef<'a>
impl<'a> !Send for RailDef<'a>
impl<'a> !Sync for RailDef<'a>
impl<'a> Unpin for RailDef<'a>
impl<'a> !UnwindSafe for RailDef<'a>
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