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§
source§impl 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§
source§impl Clone for DirectedEdgePath
impl Clone for DirectedEdgePath
source§fn clone(&self) -> DirectedEdgePath
fn clone(&self) -> DirectedEdgePath
Returns a copy 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 DirectedEdgePath
impl Debug for DirectedEdgePath
source§impl<'de> Deserialize<'de> for DirectedEdgePath
impl<'de> Deserialize<'de> for DirectedEdgePath
source§fn 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
source§impl Ord for DirectedEdgePath
impl Ord for DirectedEdgePath
source§impl PartialEq<DirectedEdgePath> for DirectedEdgePath
impl PartialEq<DirectedEdgePath> for DirectedEdgePath
source§fn eq(&self, other: &DirectedEdgePath) -> bool
fn eq(&self, other: &DirectedEdgePath) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<DirectedEdgePath> for DirectedEdgePath
impl PartialOrd<DirectedEdgePath> for DirectedEdgePath
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl 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§
§impl<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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.