Function munyo::from_str

source ·
pub fn from_str<T>(text: &str) -> Result<Vec<T>>
Expand description

Deserialize items from the text of the Munyo language.

§Example

#[derive(serde::Deserialize, Debug, PartialEq)]
enum Enum{
	Foo,
}
fn main() -> munyo::Result<()>{
	let v : Vec<Enum> = munyo::from_str("Foo")?;
	assert_eq!(&v[0], &Enum::Foo);
	Ok(())
}