Struct ldtk2::Definitions[][src]

pub struct Definitions {
    pub entities: Vec<EntityDefinition>,
    pub enums: Vec<EnumDefinition>,
    pub external_enums: Vec<EnumDefinition>,
    pub layers: Vec<LayerDefinition>,
    pub tilesets: Vec<TilesetDefinition>,
}

A structure containing all the definitions of this project

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<EntityDefinition>enums: Vec<EnumDefinition>external_enums: Vec<EnumDefinition>

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

layers: Vec<LayerDefinition>tilesets: Vec<TilesetDefinition>

Trait Implementations

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, 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.