[][src]Function liblet::automaton::transitions

pub fn transitions(string: &str) -> Vec<Transition<Symbol>>

Convenience method for creating a collections of transitions from a string.

It returns the transition directly, as opposed to the Result returned from the transition from_string method.

Panics

Panics if converting the string to transitions is not possible as specified in the transition from_string method.

Examples

use liblet::automaton::transitions;

let t = transitions("A1 -> label1 -> B1\nA2 -> label2 -> B2");
assert_eq!(t.len(), 2);