A thin crate for people who just want to use ldtk files freely.
.except()
inside the crate, you can't handle errors.^1.1.3
sh
cargo add ldtk2
```rust use std::{error::Error, path::Path, convert::TryInto};
fn main() -> Result<(), Box
let map = Ldtk::frompath("tests/example.ldtk")?; // or let map: Ldtk = Path::new("tests/example.ldtk").tryinto()?; // or let map = Ldtk::fromstr(includestr!("../tests/example.ldtk"))?; // or let map: Ldtk = includestr!("../tests/example.ldtk").tryinto()?;
Ok(()) } ```