[−][src]Struct ogmo3::project::Project
An Ogmo project.
Fields
name: String
The name of the Ogmo project.
level_paths: Vec<PathBuf>
An array of paths that hold the project's levels.
background_color: String
The project's background color.
grid_color: String
The color of the grid displayed in the editor.
angles_radians: bool
Whether the project describes angles in radians or degrees.
default_export_mode: String
The default exported file type of a level.
directory_depth: i32
The maximum depth that the editor will search for levels in its file tree.
level_default_size: Vec2<i32>
The default size of newly created levels in the editor.
level_min_size: Vec2<i32>
The minimum size of a level.
level_max_size: Vec2<i32>
The maximum size of a level.
level_values: Vec<ValueTemplate>
The value templates for the project's levels.
The tags that can be attached to entities.
layers: Vec<LayerTemplate>
The project's layer templates.
entities: Vec<EntityTemplate>
The project's entity templates.
tilesets: Vec<Tileset>
The project's tilesets.
layer_grid_default_size: Vec2<i32>
The default grid size for newly created layers.
Implementations
impl Project
[src]
pub fn from_json(s: &str) -> Result<Project, Error>
[src]
Parses an Ogmo project from a JSON string.
Errors
Error::Json
will be returned if deserialization fails.
pub fn from_file(path: impl AsRef<Path>) -> Result<Project, Error>
[src]
Parses an Ogmo project from a file.
Errors
Error::Io
will be returned if the file cannot be read.Error::Json
will be returned if deserialization fails.
Trait Implementations
impl Clone for Project
[src]
impl Debug for Project
[src]
impl<'de> Deserialize<'de> for Project
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,