pub struct DynamicTransportCost { /* private fields */ }Expand description
Provides way to calculate transport costs which might contain reserved time.
Implementations
sourceimpl DynamicTransportCost
impl DynamicTransportCost
sourcepub fn new(
reserved_times_index: ReservedTimesIndex,
inner: Arc<dyn TransportCost + Send + Sync>
) -> Result<Self, String>
pub fn new(
reserved_times_index: ReservedTimesIndex,
inner: Arc<dyn TransportCost + Send + Sync>
) -> Result<Self, String>
Creates a new instance of DynamicTransportCost.
Trait Implementations
sourceimpl TransportCost for DynamicTransportCost
impl TransportCost for DynamicTransportCost
sourcefn duration_approx(
&self,
profile: &Profile,
from: Location,
to: Location
) -> Duration
fn duration_approx(
&self,
profile: &Profile,
from: Location,
to: Location
) -> Duration
Returns time-independent travel duration between locations specific for given profile.
sourcefn distance_approx(
&self,
profile: &Profile,
from: Location,
to: Location
) -> Distance
fn distance_approx(
&self,
profile: &Profile,
from: Location,
to: Location
) -> Distance
Returns time-independent travel distance between locations specific for given profile.
sourcefn duration(
&self,
route: &Route,
from: Location,
to: Location,
travel_time: TravelTime
) -> Duration
fn duration(
&self,
route: &Route,
from: Location,
to: Location,
travel_time: TravelTime
) -> Duration
Returns time-dependent travel duration between locations specific for given actor.
Auto Trait Implementations
impl !RefUnwindSafe for DynamicTransportCost
impl Send for DynamicTransportCost
impl Sync for DynamicTransportCost
impl Unpin for DynamicTransportCost
impl !UnwindSafe for DynamicTransportCost
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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