#[non_exhaustive]pub struct AggregatedMetrics {
pub performed_shipment_count: i32,
pub travel_duration: Option<Duration>,
pub wait_duration: Option<Duration>,
pub delay_duration: Option<Duration>,
pub break_duration: Option<Duration>,
pub visit_duration: Option<Duration>,
pub total_duration: Option<Duration>,
pub travel_distance_meters: f64,
pub max_loads: HashMap<String, VehicleLoad>,
pub costs: HashMap<String, f64>,
pub total_cost: f64,
/* private fields */
}Expand description
Aggregated metrics for ShipmentRoute (resp. for OptimizeToursResponse over all Transition and/or Visit (resp. over all ShipmentRoute) elements.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.performed_shipment_count: i32Number of shipments performed. Note that a pickup and delivery pair only counts once.
travel_duration: Option<Duration>Total travel duration for a route or a solution.
wait_duration: Option<Duration>Total wait duration for a route or a solution.
delay_duration: Option<Duration>Total delay duration for a route or a solution.
break_duration: Option<Duration>Total break duration for a route or a solution.
visit_duration: Option<Duration>Total visit duration for a route or a solution.
total_duration: Option<Duration>The total duration should be equal to the sum of all durations above.
For routes, it also corresponds to:
ShipmentRoute.vehicle_end_time
-
ShipmentRoute.vehicle_start_time
travel_distance_meters: f64Total travel distance for a route or a solution.
max_loads: HashMap<String, VehicleLoad>Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.
costs: HashMap<String, f64>Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.
total_cost: f64Deprecated: Use ShipmentRoute.route_total_cost and OptimizeToursResponse.Metrics.total_cost instead.
Implementations§
Source§impl AggregatedMetrics
impl AggregatedMetrics
Sourcepub fn set_performed_shipment_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_performed_shipment_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of performed_shipment_count.
§Example
let x = AggregatedMetrics::new().set_performed_shipment_count(42);Sourcepub fn set_travel_duration<T>(self, v: T) -> Self
pub fn set_travel_duration<T>(self, v: T) -> Self
Sets the value of travel_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_travel_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_travel_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_travel_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of travel_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_or_clear_travel_duration(Some(Duration::default()/* use setters */));
let x = AggregatedMetrics::new().set_or_clear_travel_duration(None::<Duration>);Sourcepub fn set_wait_duration<T>(self, v: T) -> Self
pub fn set_wait_duration<T>(self, v: T) -> Self
Sets the value of wait_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_wait_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_wait_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_wait_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of wait_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_or_clear_wait_duration(Some(Duration::default()/* use setters */));
let x = AggregatedMetrics::new().set_or_clear_wait_duration(None::<Duration>);Sourcepub fn set_delay_duration<T>(self, v: T) -> Self
pub fn set_delay_duration<T>(self, v: T) -> Self
Sets the value of delay_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_delay_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_delay_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_delay_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of delay_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_or_clear_delay_duration(Some(Duration::default()/* use setters */));
let x = AggregatedMetrics::new().set_or_clear_delay_duration(None::<Duration>);Sourcepub fn set_break_duration<T>(self, v: T) -> Self
pub fn set_break_duration<T>(self, v: T) -> Self
Sets the value of break_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_break_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_break_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_break_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of break_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_or_clear_break_duration(Some(Duration::default()/* use setters */));
let x = AggregatedMetrics::new().set_or_clear_break_duration(None::<Duration>);Sourcepub fn set_visit_duration<T>(self, v: T) -> Self
pub fn set_visit_duration<T>(self, v: T) -> Self
Sets the value of visit_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_visit_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_visit_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_visit_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of visit_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_or_clear_visit_duration(Some(Duration::default()/* use setters */));
let x = AggregatedMetrics::new().set_or_clear_visit_duration(None::<Duration>);Sourcepub fn set_total_duration<T>(self, v: T) -> Self
pub fn set_total_duration<T>(self, v: T) -> Self
Sets the value of total_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_total_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_total_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_total_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of total_duration.
§Example
use wkt::Duration;
let x = AggregatedMetrics::new().set_or_clear_total_duration(Some(Duration::default()/* use setters */));
let x = AggregatedMetrics::new().set_or_clear_total_duration(None::<Duration>);Sourcepub fn set_travel_distance_meters<T: Into<f64>>(self, v: T) -> Self
pub fn set_travel_distance_meters<T: Into<f64>>(self, v: T) -> Self
Sets the value of travel_distance_meters.
§Example
let x = AggregatedMetrics::new().set_travel_distance_meters(42.0);Sourcepub fn set_max_loads<T, K, V>(self, v: T) -> Self
pub fn set_max_loads<T, K, V>(self, v: T) -> Self
Sourcepub fn set_total_cost<T: Into<f64>>(self, v: T) -> Self
👎Deprecated
pub fn set_total_cost<T: Into<f64>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for AggregatedMetrics
impl Clone for AggregatedMetrics
Source§fn clone(&self) -> AggregatedMetrics
fn clone(&self) -> AggregatedMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AggregatedMetrics
impl Debug for AggregatedMetrics
Source§impl Default for AggregatedMetrics
impl Default for AggregatedMetrics
Source§fn default() -> AggregatedMetrics
fn default() -> AggregatedMetrics
Source§impl Message for AggregatedMetrics
impl Message for AggregatedMetrics
Source§impl PartialEq for AggregatedMetrics
impl PartialEq for AggregatedMetrics
impl StructuralPartialEq for AggregatedMetrics
Auto Trait Implementations§
impl Freeze for AggregatedMetrics
impl RefUnwindSafe for AggregatedMetrics
impl Send for AggregatedMetrics
impl Sync for AggregatedMetrics
impl Unpin for AggregatedMetrics
impl UnsafeUnpin for AggregatedMetrics
impl UnwindSafe for AggregatedMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request