pub struct OptimizeToursValidationError {
pub code: i32,
pub display_name: String,
pub fields: Vec<FieldReference>,
pub error_message: String,
pub offending_values: String,
}
Expand description
Describes an error or warning encountered when validating an
OptimizeToursRequest
.
Fields§
§code: i32
A validation error is defined by the pair (code
, display_name
) which
are always present.
The fields following this section provide more context about the error.
MULTIPLE ERRORS:
When there are multiple errors, the validation process tries to output
several of them. Much like a compiler, this is an imperfect process. Some
validation errors will be “fatal”, meaning that they stop the entire
validation process. This is the case for display_name="UNSPECIFIED"
errors, among others. Some errors may cause the validation process to skip
other errors.
STABILITY:
code
and display_name
should be very stable. But new codes and
display names may appear over time, which may cause a given (invalid)
request to yield a different (code
, display_name
) pair because the new
error hid the old one. For example, see “MULTIPLE ERRORS”.
display_name: String
The error display name.
fields: Vec<FieldReference>
An error context may involve 0, 1 (most of the time) or more fields. For example, referring to vehicle #4 and shipment #2’s first pickup can be done as follows:
fields { name: "vehicles" index: 4}
fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
Note, however, that the cardinality of fields
should not change for a
given error code.
error_message: String
Human-readable string describing the error. There is a 1:1 mapping
between code
and error_message
(when code != “UNSPECIFIED”).
STABILITY: Not stable: the error message associated to a given code
may
change (hopefully to clarify it) over time. Please rely on the
display_name
and code
instead.
offending_values: String
May contain the value(s) of the field(s). This is not always available. You should absolutely not rely on it and use it only for manual model debugging.
Trait Implementations§
Source§impl Clone for OptimizeToursValidationError
impl Clone for OptimizeToursValidationError
Source§fn clone(&self) -> OptimizeToursValidationError
fn clone(&self) -> OptimizeToursValidationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OptimizeToursValidationError
impl Debug for OptimizeToursValidationError
Source§impl Message for OptimizeToursValidationError
impl Message for OptimizeToursValidationError
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl PartialEq for OptimizeToursValidationError
impl PartialEq for OptimizeToursValidationError
Source§fn eq(&self, other: &OptimizeToursValidationError) -> bool
fn eq(&self, other: &OptimizeToursValidationError) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for OptimizeToursValidationError
Auto Trait Implementations§
impl Freeze for OptimizeToursValidationError
impl RefUnwindSafe for OptimizeToursValidationError
impl Send for OptimizeToursValidationError
impl Sync for OptimizeToursValidationError
impl Unpin for OptimizeToursValidationError
impl UnwindSafe for OptimizeToursValidationError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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