pub struct AllowedModes(/* private fields */);Expand description
Compact permission set describing which travel modes are allowed.
Implementations§
Source§impl AllowedModes
impl AllowedModes
Sourcepub fn pedestrian_only() -> Self
pub fn pedestrian_only() -> Self
Convenience set for pedestrian-only access.
Sourcepub fn allows(self, mode: TravelMode) -> bool
pub fn allows(self, mode: TravelMode) -> bool
Returns true if the given mode is allowed.
Sourcepub fn with_mode(self, mode: TravelMode) -> Self
pub fn with_mode(self, mode: TravelMode) -> Self
Return a copy with the given mode enabled.
Trait Implementations§
Source§impl Clone for AllowedModes
impl Clone for AllowedModes
Source§fn clone(&self) -> AllowedModes
fn clone(&self) -> AllowedModes
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 AllowedModes
impl Debug for AllowedModes
Source§impl Default for AllowedModes
impl Default for AllowedModes
Source§fn default() -> AllowedModes
fn default() -> AllowedModes
Returns the “default value” for a type. Read more
Source§impl Hash for AllowedModes
impl Hash for AllowedModes
Source§impl PartialEq for AllowedModes
impl PartialEq for AllowedModes
impl Copy for AllowedModes
impl Eq for AllowedModes
impl StructuralPartialEq for AllowedModes
Auto Trait Implementations§
impl Freeze for AllowedModes
impl RefUnwindSafe for AllowedModes
impl Send for AllowedModes
impl Sync for AllowedModes
impl Unpin for AllowedModes
impl UnsafeUnpin for AllowedModes
impl UnwindSafe for AllowedModes
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