Enum h3ron_graph::algorithm::path::DirectedEdgePath
source · [−]pub enum DirectedEdgePath {
OriginIsDestination(H3Cell),
DirectedEdgeSequence(Vec<H3DirectedEdge>),
}Expand description
DirectedEdgePath describes a path between a cell and another.
Variants
OriginIsDestination(H3Cell)
path is empty as origin and destination are the same.
DirectedEdgeSequence(Vec<H3DirectedEdge>)
a sequence of edges describing the path.
The edges in the vec are expected to be consecutive.
The cost is the total cost summed for all of the edges.
Implementations
sourceimpl DirectedEdgePath
impl DirectedEdgePath
pub fn is_empty(&self) -> bool
pub fn origin_cell(&self) -> Result<H3Cell, Error>
pub fn destination_cell(&self) -> Result<H3Cell, Error>
pub fn to_linestring(&self) -> Result<LineString<f64>, Error>
pub fn edges(&self) -> &[H3DirectedEdge]
Trait Implementations
sourceimpl Clone for DirectedEdgePath
impl Clone for DirectedEdgePath
sourcefn clone(&self) -> DirectedEdgePath
fn clone(&self) -> DirectedEdgePath
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for DirectedEdgePath
impl Debug for DirectedEdgePath
sourceimpl<'de> Deserialize<'de> for DirectedEdgePath
impl<'de> Deserialize<'de> for DirectedEdgePath
sourcefn 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
sourceimpl Ord for DirectedEdgePath
impl Ord for DirectedEdgePath
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<DirectedEdgePath> for DirectedEdgePath
impl PartialEq<DirectedEdgePath> for DirectedEdgePath
sourcefn eq(&self, other: &DirectedEdgePath) -> bool
fn eq(&self, other: &DirectedEdgePath) -> bool
sourceimpl PartialOrd<DirectedEdgePath> for DirectedEdgePath
impl PartialOrd<DirectedEdgePath> for DirectedEdgePath
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl Serialize for DirectedEdgePath
impl Serialize for DirectedEdgePath
impl Eq for DirectedEdgePath
impl StructuralEq for DirectedEdgePath
impl StructuralPartialEq for DirectedEdgePath
Auto Trait Implementations
impl RefUnwindSafe for DirectedEdgePath
impl Send for DirectedEdgePath
impl Sync for DirectedEdgePath
impl Unpin for DirectedEdgePath
impl UnwindSafe for DirectedEdgePath
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.