from_str

Function from_str 

Source
pub fn from_str(s: &str) -> Result<Vec<LogEnum>, ()>
Examples found in repository?
examples/list.rs (line 8)
5fn main() {
6    let args: Vec<String> = env::args().collect();
7    let content = fs::read_to_string(&args[1]).unwrap();
8    let log = vrchat_log::from_str(&content).unwrap();
9    for l in log {
10        println!("{:?}", l);
11    }
12}
More examples
Hide additional examples
examples/world.rs (line 8)
5fn main() {
6    let args: Vec<String> = env::args().collect();
7    let content = fs::read_to_string(&args[1]).unwrap();
8    let log = vrchat_log::from_str(&content).unwrap();
9    let ilog: vrchat_log::InstanceLogList = (&log).into();
10
11    for i in ilog.iter() {
12        println!("{:?}", i);
13    }
14}