pub struct HL {
pub style: EdgeStyle,
pub f: u64,
pub t: u64,
pub from: Option<Coordinate>,
pub to: Option<Coordinate>,
}
Fields§
§style: EdgeStyle
§f: u64
§t: u64
§from: Option<Coordinate>
§to: Option<Coordinate>
Implementations§
Source§impl HL
impl HL
pub fn new(f: u64, t: u64) -> Self
Sourcepub fn style(&mut self, style: EdgeStyle)
pub fn style(&mut self, style: EdgeStyle)
Sets the algorithm the edge will use to be drawn.
Check out the EdgeStyle enum for all alternatives.
§Examples
Sets the style to be ‘straight’ meaning sharp like an L shape.
let b = cluster!();
let mut a = node!();
a.link(&b);
a.hl_mut(0)?.style(EdgeStyle::Straight);
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Checks if the HL has two endpoint hashes.
§Examples
let b = cluster!();
let mut a = node!();
a.link(&b);
assert!(a.hl(0)?.is_connected());
Trait Implementations§
Source§impl Location for HL
impl Location for HL
Source§fn position(&self) -> Coordinate
fn position(&self) -> Coordinate
Retrieves the position Coordinates.
Source§impl MinMax for HL
impl MinMax for HL
fn min_max(&self) -> (Coordinate, Coordinate)
impl Copy for HL
impl Eq for HL
impl StructuralPartialEq for HL
Auto Trait Implementations§
impl Freeze for HL
impl RefUnwindSafe for HL
impl Send for HL
impl Sync for HL
impl Unpin for HL
impl UnwindSafe for HL
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