[][src]Struct ldtk::Definitions

pub struct Definitions {
    pub entities: Vec<EntityDef>,
    pub enums: Vec<EnumDef>,
    pub external_enums: Vec<EnumDef>,
    pub layers: Vec<LayerDef>,
    pub tilesets: Vec<TilesetDef>,
}

If you're writing your own LDtk importer, you should probably just ignore most stuff in the defs section, as it contains data that are mostly important to the editor. To keep you away from the defs section and avoid some unnecessary JSON parsing, important data from definitions is often duplicated in fields prefixed with a double underscore (eg. __identifier or __type). The 2 only definition types you might need here are Tilesets and Enums.

Fields

entities: Vec<EntityDef>
enums: Vec<EnumDef>
external_enums: Vec<EnumDef>

Note: external enums are exactly the same as enums, except they have a relPath to point to an external source file.

layers: Vec<LayerDef>
tilesets: Vec<TilesetDef>

Trait Implementations

impl Clone for Definitions[src]

impl Debug for Definitions[src]

impl<'de> Deserialize<'de> for Definitions[src]

impl Serialize for Definitions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.