[][src]Struct pathfinder::HL

pub struct HL {
    pub style: EdgeStyle,
    pub f: u64,
    pub t: u64,
    pub from: Option<Coordinate>,
    pub to: Option<Coordinate>,
}

Fields

style: EdgeStylef: u64t: u64from: Option<Coordinate>to: Option<Coordinate>

Methods

impl HL[src]

pub fn new(f: u64, t: u64) -> Self[src]

pub fn style(&mut self, style: EdgeStyle)[src]

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);

pub fn is_connected(&self) -> bool[src]

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

impl Location for HL[src]

fn eq<L: Location>(&self, other: &L) -> bool[src]

Returns if the positions are equal or not.

fn x(&self) -> i16[src]

Retrieves the X coordinate.

fn y(&self) -> i16[src]

Retrieves the Y coordinate.

fn sum(&self) -> i16[src]

Returns the sum of the x and y value.

impl MinMax for HL[src]

impl Find for HL[src]

fn find<H: Hash>(&self, hash: H) -> Option<Coordinate>[src]

Matches the Hashes and returns Some if it matches.

impl Hash for HL[src]

Provides the function to retrieve a hash from a structure.

impl PartialEq<HL> for HL[src]

impl Copy for HL[src]

impl Eq for HL[src]

impl Default for HL[src]

impl Clone for HL[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for HL[src]

impl Display for HL[src]

Auto Trait Implementations

impl Send for HL

impl Unpin for HL

impl Sync for HL

impl UnwindSafe for HL

impl RefUnwindSafe for HL

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.