A thin crate for people who just want to use ldtk files freely.
.except()
inside the crate, you can't handle errors.>=0.7.2
sh
cargo add ldtk2
```rust use std::error::Error; use std::path::Path; use std::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(()) } ```