pub struct TravellerContext {
pub traveller_id: u64,
pub current_leg: usize,
pub state: ModeState,
}Expand description
Per-traveller context held by the caller.
Fields§
§traveller_id: u64Traveller (agent) identifier.
current_leg: usizeIndex into the current trip’s legs list.
state: ModeStateCurrent mode state.
Implementations§
Source§impl TravellerContext
impl TravellerContext
Sourcepub fn new(traveller_id: u64) -> Self
pub fn new(traveller_id: u64) -> Self
Start a new traveller at leg 0 in ModeState::Idle.
Trait Implementations§
Source§impl Clone for TravellerContext
impl Clone for TravellerContext
Source§fn clone(&self) -> TravellerContext
fn clone(&self) -> TravellerContext
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 moreAuto Trait Implementations§
impl Freeze for TravellerContext
impl RefUnwindSafe for TravellerContext
impl Send for TravellerContext
impl Sync for TravellerContext
impl Unpin for TravellerContext
impl UnsafeUnpin for TravellerContext
impl UnwindSafe for TravellerContext
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