Struct ldtk2::Definitions [−][src]
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Definitions
[src]
Auto Trait Implementations
impl RefUnwindSafe for Definitions
[src]
impl Send for Definitions
[src]
impl Sync for Definitions
[src]
impl Unpin for Definitions
[src]
impl UnwindSafe for Definitions
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,