Struct x11rb::protocol::xf86vidmode::Permission
source · pub struct Permission(/* private fields */);
Implementations§
source§impl Permission
impl Permission
pub const READ: Permission = _
pub const WRITE: Permission = _
source§impl Permission
impl Permission
sourcepub fn contains(self, flag: impl Into<u32>) -> bool
pub fn contains(self, flag: impl Into<u32>) -> bool
Check if this object has all bits set that are also set in flag
.
flag
can be a single enum variant or a whole other mask.
sourcepub fn intersects(self, flag: impl Into<u32>) -> bool
pub fn intersects(self, flag: impl Into<u32>) -> bool
Check if this object has some bits set that are also set in flag
.
flag
can be a single enum variant or a whole other mask.
sourcepub fn remove(self, flags: impl Into<u32>) -> Permission
pub fn remove(self, flags: impl Into<u32>) -> Permission
Remove some flags.
All bits that are set in the given flags are removed from the self
instance, if
they are present.
Trait Implementations§
source§impl BitAnd<u32> for Permission
impl BitAnd<u32> for Permission
source§impl BitAnd for Permission
impl BitAnd for Permission
§type Output = Permission
type Output = Permission
The resulting type after applying the
&
operator.source§fn bitand(self, other: Permission) -> <Permission as BitAnd>::Output
fn bitand(self, other: Permission) -> <Permission as BitAnd>::Output
Performs the
&
operation. Read moresource§impl BitAndAssign<u32> for Permission
impl BitAndAssign<u32> for Permission
source§fn bitand_assign(&mut self, other: u32)
fn bitand_assign(&mut self, other: u32)
Performs the
&=
operation. Read moresource§impl BitAndAssign for Permission
impl BitAndAssign for Permission
source§fn bitand_assign(&mut self, other: Permission)
fn bitand_assign(&mut self, other: Permission)
Performs the
&=
operation. Read moresource§impl BitOr<u32> for Permission
impl BitOr<u32> for Permission
source§impl BitOr for Permission
impl BitOr for Permission
§type Output = Permission
type Output = Permission
The resulting type after applying the
|
operator.source§fn bitor(self, other: Permission) -> <Permission as BitOr>::Output
fn bitor(self, other: Permission) -> <Permission as BitOr>::Output
Performs the
|
operation. Read moresource§impl BitOrAssign<u32> for Permission
impl BitOrAssign<u32> for Permission
source§fn bitor_assign(&mut self, other: u32)
fn bitor_assign(&mut self, other: u32)
Performs the
|=
operation. Read moresource§impl BitOrAssign for Permission
impl BitOrAssign for Permission
source§fn bitor_assign(&mut self, other: Permission)
fn bitor_assign(&mut self, other: Permission)
Performs the
|=
operation. Read moresource§impl Clone for Permission
impl Clone for Permission
source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
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 Permission
impl Debug for Permission
source§impl Default for Permission
impl Default for Permission
source§fn default() -> Permission
fn default() -> Permission
Returns the “default value” for a type. Read more
source§impl From<u16> for Permission
impl From<u16> for Permission
source§fn from(value: u16) -> Permission
fn from(value: u16) -> Permission
Converts to this type from the input type.
source§impl From<u32> for Permission
impl From<u32> for Permission
source§fn from(value: u32) -> Permission
fn from(value: u32) -> Permission
Converts to this type from the input type.
source§impl From<u8> for Permission
impl From<u8> for Permission
source§fn from(value: u8) -> Permission
fn from(value: u8) -> Permission
Converts to this type from the input type.
source§impl Hash for Permission
impl Hash for Permission
source§impl Ord for Permission
impl Ord for Permission
source§fn cmp(&self, other: &Permission) -> Ordering
fn cmp(&self, other: &Permission) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Permission
impl PartialEq for Permission
source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Permission
impl PartialOrd for Permission
source§fn partial_cmp(&self, other: &Permission) -> Option<Ordering>
fn partial_cmp(&self, other: &Permission) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Permission
impl Eq for Permission
impl StructuralPartialEq for Permission
Auto Trait Implementations§
impl Freeze for Permission
impl RefUnwindSafe for Permission
impl Send for Permission
impl Sync for Permission
impl Unpin for Permission
impl UnwindSafe for Permission
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