Trait TransportFallback

Source
pub trait TransportFallback: Send + Sync {
    // Required methods
    fn duration(
        &self,
        profile: &Profile,
        from: Location,
        to: Location,
    ) -> Duration;
    fn distance(
        &self,
        profile: &Profile,
        from: Location,
        to: Location,
    ) -> Distance;
}
Expand description

A fallback for transport costs if from->to entry is not defined.

Required Methods§

Source

fn duration(&self, profile: &Profile, from: Location, to: Location) -> Duration

Returns fallback duration.

Source

fn distance(&self, profile: &Profile, from: Location, to: Location) -> Distance

Returns fallback distance.

Implementors§