Struct vrp_core::construction::heuristics::RouteContext
source · pub struct RouteContext { /* private fields */ }
Expand description
Specifies insertion context for route.
Implementations§
source§impl RouteContext
impl RouteContext
sourcepub fn new_with_state(route: Route, state: RouteState) -> Self
pub fn new_with_state(route: Route, state: RouteState) -> Self
Creates a new instance of RouteContext
with arguments provided.
sourcepub fn state(&self) -> &RouteState
pub fn state(&self) -> &RouteState
Returns a reference to state.
sourcepub fn as_mut(&mut self) -> (&mut Route, &mut RouteState)
pub fn as_mut(&mut self) -> (&mut Route, &mut RouteState)
Unwraps given RouteContext
as pair of mutable references.
Marks context as stale.
sourcepub fn route_mut(&mut self) -> &mut Route
pub fn route_mut(&mut self) -> &mut Route
Returns mutable reference to used Route
.
Marks context as stale.
sourcepub fn state_mut(&mut self) -> &mut RouteState
pub fn state_mut(&mut self) -> &mut RouteState
Returns mutable reference to used RouteState
.
Marks context as stale.
Trait Implementations§
source§impl Debug for RouteContext
impl Debug for RouteContext
source§impl PartialEq for RouteContext
impl PartialEq for RouteContext
source§fn eq(&self, other: &RouteContext) -> bool
fn eq(&self, other: &RouteContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for RouteContext
Auto Trait Implementations§
impl !RefUnwindSafe for RouteContext
impl Send for RouteContext
impl Sync for RouteContext
impl Unpin for RouteContext
impl !UnwindSafe for RouteContext
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