#[non_exhaustive]pub struct OptimizeToursResponse {
pub routes: Vec<ShipmentRoute>,
pub request_label: String,
pub skipped_shipments: Vec<SkippedShipment>,
pub validation_errors: Vec<OptimizeToursValidationError>,
pub metrics: Option<Metrics>,
pub total_cost: f64,
/* private fields */
}Expand description
Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.
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.routes: Vec<ShipmentRoute>Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.
request_label: StringCopy of the OptimizeToursRequest.label, if a label was specified in the request.
skipped_shipments: Vec<SkippedShipment>The list of all shipments skipped.
validation_errors: Vec<OptimizeToursValidationError>List of all the validation errors that we were able to detect independently. See the “MULTIPLE ERRORS” explanation for the OptimizeToursValidationError message.
metrics: Option<Metrics>Duration, distance and usage metrics for this solution.
total_cost: f64Deprecated: Use Metrics.total_cost instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.
Implementations§
Source§impl OptimizeToursResponse
impl OptimizeToursResponse
Sourcepub fn set_routes<T, V>(self, v: T) -> Self
pub fn set_routes<T, V>(self, v: T) -> Self
Sourcepub fn set_request_label<T: Into<String>>(self, v: T) -> Self
pub fn set_request_label<T: Into<String>>(self, v: T) -> Self
Sets the value of request_label.
§Example
let x = OptimizeToursResponse::new().set_request_label("example");Sourcepub fn set_skipped_shipments<T, V>(self, v: T) -> Self
pub fn set_skipped_shipments<T, V>(self, v: T) -> Self
Sets the value of skipped_shipments.
§Example
use google_cloud_optimization_v1::model::SkippedShipment;
let x = OptimizeToursResponse::new()
.set_skipped_shipments([
SkippedShipment::default()/* use setters */,
SkippedShipment::default()/* use (different) setters */,
]);Sourcepub fn set_validation_errors<T, V>(self, v: T) -> Self
pub fn set_validation_errors<T, V>(self, v: T) -> Self
Sets the value of validation_errors.
§Example
use google_cloud_optimization_v1::model::OptimizeToursValidationError;
let x = OptimizeToursResponse::new()
.set_validation_errors([
OptimizeToursValidationError::default()/* use setters */,
OptimizeToursValidationError::default()/* use (different) setters */,
]);Sourcepub fn set_metrics<T>(self, v: T) -> Self
pub fn set_metrics<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_metrics<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metrics<T>(self, v: Option<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 OptimizeToursResponse
impl Clone for OptimizeToursResponse
Source§fn clone(&self) -> OptimizeToursResponse
fn clone(&self) -> OptimizeToursResponse
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 OptimizeToursResponse
impl Debug for OptimizeToursResponse
Source§impl Default for OptimizeToursResponse
impl Default for OptimizeToursResponse
Source§fn default() -> OptimizeToursResponse
fn default() -> OptimizeToursResponse
Source§impl Message for OptimizeToursResponse
impl Message for OptimizeToursResponse
Source§impl PartialEq for OptimizeToursResponse
impl PartialEq for OptimizeToursResponse
impl StructuralPartialEq for OptimizeToursResponse
Auto Trait Implementations§
impl Freeze for OptimizeToursResponse
impl RefUnwindSafe for OptimizeToursResponse
impl Send for OptimizeToursResponse
impl Sync for OptimizeToursResponse
impl Unpin for OptimizeToursResponse
impl UnsafeUnpin for OptimizeToursResponse
impl UnwindSafe for OptimizeToursResponse
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