pub struct RelayUsageSet(/* private fields */);
Expand description
The ways that a user uses a Relay
Implementations§
source§impl RelayUsageSet
impl RelayUsageSet
sourcepub const fn from_bits(bits: u32) -> Option<RelayUsageSet>
pub const fn from_bits(bits: u32) -> Option<RelayUsageSet>
Set from a u32 bitflag representation. If any unknown bits are set, this will return None
sourcepub const fn from_bits_truncate(bits: u32) -> RelayUsageSet
pub const fn from_bits_truncate(bits: u32) -> RelayUsageSet
Set from a u32 bitflag representation. If any unknown bits are set, they will be cleared
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any usage in other is also in Self
sourcepub fn has_usage(&mut self, ru: RelayUsage) -> bool
pub fn has_usage(&mut self, ru: RelayUsage) -> bool
Has a RelayUsage set
sourcepub fn add_usage(&mut self, ru: RelayUsage)
pub fn add_usage(&mut self, ru: RelayUsage)
Add a RelayUsage to Self
sourcepub fn remove_usage(&mut self, ru: RelayUsage)
pub fn remove_usage(&mut self, ru: RelayUsage)
Remove a RelayUsage to Self
Trait Implementations§
source§impl Clone for RelayUsageSet
impl Clone for RelayUsageSet
source§fn clone(&self) -> RelayUsageSet
fn clone(&self) -> RelayUsageSet
Returns a copy 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 RelayUsageSet
impl Debug for RelayUsageSet
source§impl Default for RelayUsageSet
impl Default for RelayUsageSet
source§fn default() -> RelayUsageSet
fn default() -> RelayUsageSet
Returns the “default value” for a type. Read more
source§impl Hash for RelayUsageSet
impl Hash for RelayUsageSet
source§impl PartialEq for RelayUsageSet
impl PartialEq for RelayUsageSet
impl Copy for RelayUsageSet
impl Eq for RelayUsageSet
impl StructuralPartialEq for RelayUsageSet
Auto Trait Implementations§
impl Freeze for RelayUsageSet
impl RefUnwindSafe for RelayUsageSet
impl Send for RelayUsageSet
impl Sync for RelayUsageSet
impl Unpin for RelayUsageSet
impl UnwindSafe for RelayUsageSet
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)