pub struct Object {
pub gid: Option<u32>,
pub id: Option<u32>,
pub name: String,
pub custom_type: String,
pub rotation: f32,
pub height: f32,
pub width: f32,
pub x: f32,
pub y: f32,
pub properties: HashMap<String, TiledValue>,
pub object_type: ObjectType,
}
Fields§
§gid: Option<u32>
§id: Option<u32>
Incremental id - unique across all objects
name: String
§custom_type: String
§rotation: f32
Angle in degrees clockwise
height: f32
§width: f32
§x: f32
X coordinate in pixels
y: f32
Y coordinate in pixels
properties: HashMap<String, TiledValue>
§object_type: ObjectType
An almost concrete type. Some types aren’t included in this, eg; a square which can be derived from the X/Y & Height/Width
Types can be:
- Point
- Polygon
- Polyline
- Text
- Ellipse
- or None
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more