pub struct NodeData<UserNodeData = ()> {
pub x: f32,
pub y: f32,
pub mass: f32,
pub is_anchor: bool,
pub user_data: UserNodeData,
}Expand description
Stores data associated with a node that can be modified by the user.
Fields§
§x: f32The horizontal position of the node.
y: f32The vertical position of the node.
mass: f32The mass of the node.
Increasing the mass of a node increases the force with which it repels other nearby nodes.
is_anchor: boolWhether the node is fixed to its current position.
user_data: UserNodeDataArbitrary user data.
Defaults to () if not specified.
Trait Implementations§
Auto Trait Implementations§
impl<UserNodeData> Freeze for NodeData<UserNodeData>where
UserNodeData: Freeze,
impl<UserNodeData> RefUnwindSafe for NodeData<UserNodeData>where
UserNodeData: RefUnwindSafe,
impl<UserNodeData> Send for NodeData<UserNodeData>where
UserNodeData: Send,
impl<UserNodeData> Sync for NodeData<UserNodeData>where
UserNodeData: Sync,
impl<UserNodeData> Unpin for NodeData<UserNodeData>where
UserNodeData: Unpin,
impl<UserNodeData> UnwindSafe for NodeData<UserNodeData>where
UserNodeData: UnwindSafe,
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