pub struct LayoutPosition {
pub x: f64,
pub y: f64,
}Expand description
2D node position in layout space
Fields§
§x: f64X coordinate
y: f64Y coordinate
Implementations§
Source§impl LayoutPosition
impl LayoutPosition
Sourcepub fn distance(&self, other: &LayoutPosition) -> f64
pub fn distance(&self, other: &LayoutPosition) -> f64
Compute Euclidean distance to another position
Trait Implementations§
Source§impl Clone for LayoutPosition
impl Clone for LayoutPosition
Source§fn clone(&self) -> LayoutPosition
fn clone(&self) -> LayoutPosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutPosition
impl Debug for LayoutPosition
Source§impl PartialEq for LayoutPosition
impl PartialEq for LayoutPosition
impl Copy for LayoutPosition
impl StructuralPartialEq for LayoutPosition
Auto Trait Implementations§
impl Freeze for LayoutPosition
impl RefUnwindSafe for LayoutPosition
impl Send for LayoutPosition
impl Sync for LayoutPosition
impl Unpin for LayoutPosition
impl UnsafeUnpin for LayoutPosition
impl UnwindSafe for LayoutPosition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more