pub struct Point {
pub guid: Uuid,
pub name: String,
pub x: f32,
pub y: f32,
pub z: f32,
pub width: f32,
pub pointcolor: Color,
}
Expand description
A 3D point with visual properties and JSON serialization support.
Fields§
§guid: Uuid
§name: String
§x: f32
§y: f32
§z: f32
§width: f32
§pointcolor: Color
Implementations§
Source§impl Point
impl Point
Sourcepub fn to_json_data(&self) -> Result<String, Box<dyn Error>>
pub fn to_json_data(&self) -> Result<String, Box<dyn Error>>
Serializes the Point to a JSON string.
Sourcepub fn from_json_data(json_data: &str) -> Result<Self, Box<dyn Error>>
pub fn from_json_data(json_data: &str) -> Result<Self, Box<dyn Error>>
Deserializes a Point from a JSON string.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Point
impl<'de> Deserialize<'de> for Point
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
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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