pub struct Machine<'a> { /* private fields */ }
Expand description
Transpiler Scdlang → XState.
§Examples
let xstate = Machine::new();
xstate.configure().with_err_path("test.scl");
parser.parse("A -> B")?;
println!("{}", parser.to_string());
Implementations§
Trait Implementations§
Source§impl<'a> Parser<'a> for Machine<'a>
impl<'a> Parser<'a> for Machine<'a>
Source§fn parse(&mut self, source: &str) -> Result<(), Box<dyn Error>>
fn parse(&mut self, source: &str) -> Result<(), Box<dyn Error>>
Parse
source
then replace the results.Source§fn insert_parse(&mut self, source: &str) -> Result<(), Box<dyn Error>>
fn insert_parse(&mut self, source: &str) -> Result<(), Box<dyn Error>>
Parse
source
then insert/append the results.Source§fn try_parse(source: &str, builder: Scdlang<'a>) -> Result<Self, Box<dyn Error>>
fn try_parse(source: &str, builder: Scdlang<'a>) -> Result<Self, Box<dyn Error>>
Parse
source
while instantiate the Parser.Auto Trait Implementations§
impl<'a> Freeze for Machine<'a>
impl<'a> RefUnwindSafe for Machine<'a>
impl<'a> Send for Machine<'a>
impl<'a> Sync for Machine<'a>
impl<'a> Unpin for Machine<'a>
impl<'a> UnwindSafe for Machine<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more