#[non_exhaustive]pub struct Row {
pub durations: Vec<Duration>,
pub meters: Vec<f64>,
/* private fields */
}Expand description
Specifies a row of the duration and distance matrix.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.durations: Vec<Duration>Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.
meters: Vec<f64>Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations.
Implementations§
Source§impl Row
impl Row
pub fn new() -> Self
Sourcepub fn set_durations<T, V>(self, v: T) -> Self
pub fn set_durations<T, V>(self, v: T) -> Self
Sourcepub fn set_meters<T, V>(self, v: T) -> Self
pub fn set_meters<T, V>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnwindSafe for Row
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
Mutably borrows from an owned value. Read more