#[non_exhaustive]pub struct ShipmentTypeRequirement {
pub required_shipment_type_alternatives: Vec<String>,
pub dependent_shipment_types: Vec<String>,
pub requirement_mode: RequirementMode,
/* private fields */
}Expand description
Specifies requirements between shipments based on their shipment_type. The specifics of the requirement are defined by the requirement mode.
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.required_shipment_type_alternatives: Vec<String>List of alternative shipment types required by the
dependent_shipment_types.
dependent_shipment_types: Vec<String>All shipments with a type in the dependent_shipment_types field require
at least one shipment of type required_shipment_type_alternatives to be
visited on the same route.
NOTE: Chains of requirements such that a shipment_type depends on itself
are not allowed.
requirement_mode: RequirementModeMode applied to the requirement.
Implementations§
Source§impl ShipmentTypeRequirement
impl ShipmentTypeRequirement
pub fn new() -> Self
Sourcepub fn set_required_shipment_type_alternatives<T, V>(self, v: T) -> Self
pub fn set_required_shipment_type_alternatives<T, V>(self, v: T) -> Self
Sets the value of required_shipment_type_alternatives.
Sourcepub fn set_dependent_shipment_types<T, V>(self, v: T) -> Self
pub fn set_dependent_shipment_types<T, V>(self, v: T) -> Self
Sets the value of dependent_shipment_types.
Sourcepub fn set_requirement_mode<T: Into<RequirementMode>>(self, v: T) -> Self
pub fn set_requirement_mode<T: Into<RequirementMode>>(self, v: T) -> Self
Sets the value of requirement_mode.
Trait Implementations§
Source§impl Clone for ShipmentTypeRequirement
impl Clone for ShipmentTypeRequirement
Source§fn clone(&self) -> ShipmentTypeRequirement
fn clone(&self) -> ShipmentTypeRequirement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShipmentTypeRequirement
impl Debug for ShipmentTypeRequirement
Source§impl Default for ShipmentTypeRequirement
impl Default for ShipmentTypeRequirement
Source§fn default() -> ShipmentTypeRequirement
fn default() -> ShipmentTypeRequirement
Returns the “default value” for a type. Read more
Source§impl Message for ShipmentTypeRequirement
impl Message for ShipmentTypeRequirement
Source§impl PartialEq for ShipmentTypeRequirement
impl PartialEq for ShipmentTypeRequirement
impl StructuralPartialEq for ShipmentTypeRequirement
Auto Trait Implementations§
impl Freeze for ShipmentTypeRequirement
impl RefUnwindSafe for ShipmentTypeRequirement
impl Send for ShipmentTypeRequirement
impl Sync for ShipmentTypeRequirement
impl Unpin for ShipmentTypeRequirement
impl UnwindSafe for ShipmentTypeRequirement
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