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