pub struct Preferences { /* private fields */ }Expand description
Boarding preferences for a rider.
Implementations§
Source§impl Preferences
impl Preferences
Sourcepub const fn skip_full_elevator(&self) -> bool
pub const fn skip_full_elevator(&self) -> bool
If true, the rider will skip a crowded elevator and wait for the next.
Sourcepub const fn max_crowding_factor(&self) -> f64
pub const fn max_crowding_factor(&self) -> f64
Maximum load factor (0.0-1.0) the rider will tolerate when boarding.
Sourcepub const fn balk_threshold_ticks(&self) -> Option<u32>
pub const fn balk_threshold_ticks(&self) -> Option<u32>
Wait budget before the rider abandons. None disables balking-
based abandonment.
Sourcepub const fn abandon_on_full(&self) -> bool
pub const fn abandon_on_full(&self) -> bool
Should balking a full car convert directly to abandonment?
Sourcepub const fn with_balk_threshold_ticks(self, ticks: Option<u32>) -> Self
pub const fn with_balk_threshold_ticks(self, ticks: Option<u32>) -> Self
Builder: set balk_threshold_ticks.
Sourcepub const fn with_abandon_on_full(self, abandon: bool) -> Self
pub const fn with_abandon_on_full(self, abandon: bool) -> Self
Builder: set abandon_on_full.
Trait Implementations§
Source§impl Clone for Preferences
impl Clone for Preferences
Source§fn clone(&self) -> Preferences
fn clone(&self) -> Preferences
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 Preferences
impl Debug for Preferences
Source§impl Default for Preferences
impl Default for Preferences
Source§impl<'de> Deserialize<'de> for Preferences
impl<'de> Deserialize<'de> for Preferences
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Preferences
impl Serialize for Preferences
Source§impl WorldQuery for &Preferences
impl WorldQuery for &Preferences
impl Copy for Preferences
Auto Trait Implementations§
impl Freeze for Preferences
impl RefUnwindSafe for Preferences
impl Send for Preferences
impl Sync for Preferences
impl Unpin for Preferences
impl UnsafeUnpin for Preferences
impl UnwindSafe for Preferences
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