Enum ubits::examples::full_example::ExampleFlags
source · [−]#[repr(u8)]
pub enum ExampleFlags {
Flag0,
Flag1,
Flag2,
Flag3,
Flag4,
Flag5,
Flag6,
Flag7,
}
Expand description
Optional docstring for my flag enum.
Variants
Flag0
Optional docstring for Flag0
Flag1
Optional docstring for Flag1
Flag2
Optional docstring for Flag2
Flag3
Optional docstring for Flag3
Flag4
Optional docstring for Flag4
Flag5
Optional docstring for Flag5
Flag6
Optional docstring for Flag6
Flag7
Optional docstring for Flag7
Trait Implementations
sourceimpl BitAnd<ExampleFlags> for ExampleFlags
impl BitAnd<ExampleFlags> for ExampleFlags
sourceimpl BitAnd<ExampleFlags> for ExampleField
impl BitAnd<ExampleFlags> for ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: ExampleFlags) -> Self::Output
fn bitand(self, rhs: ExampleFlags) -> Self::Output
Performs the &
operation. Read more
sourceimpl BitAnd<ExampleFlags> for &ExampleField
impl BitAnd<ExampleFlags> for &ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: ExampleFlags) -> Self::Output
fn bitand(self, rhs: ExampleFlags) -> Self::Output
Performs the &
operation. Read more
sourceimpl BitAnd<ExampleFlags> for &mut ExampleField
impl BitAnd<ExampleFlags> for &mut ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: ExampleFlags) -> Self::Output
fn bitand(self, rhs: ExampleFlags) -> Self::Output
Performs the &
operation. Read more
sourceimpl BitAndAssign<ExampleFlags> for ExampleField
impl BitAndAssign<ExampleFlags> for ExampleField
sourcefn bitand_assign(&mut self, rhs: ExampleFlags)
fn bitand_assign(&mut self, rhs: ExampleFlags)
Performs the &=
operation. Read more
sourceimpl BitOr<ExampleFlags> for ExampleFlags
impl BitOr<ExampleFlags> for ExampleFlags
sourceimpl BitOr<ExampleFlags> for ExampleField
impl BitOr<ExampleFlags> for ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the |
operator.
sourcefn bitor(self, rhs: ExampleFlags) -> Self::Output
fn bitor(self, rhs: ExampleFlags) -> Self::Output
Performs the |
operation. Read more
sourceimpl BitOr<ExampleFlags> for &ExampleField
impl BitOr<ExampleFlags> for &ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the |
operator.
sourcefn bitor(self, rhs: ExampleFlags) -> Self::Output
fn bitor(self, rhs: ExampleFlags) -> Self::Output
Performs the |
operation. Read more
sourceimpl BitOr<ExampleFlags> for &mut ExampleField
impl BitOr<ExampleFlags> for &mut ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the |
operator.
sourcefn bitor(self, rhs: ExampleFlags) -> Self::Output
fn bitor(self, rhs: ExampleFlags) -> Self::Output
Performs the |
operation. Read more
sourceimpl BitOrAssign<ExampleFlags> for ExampleField
impl BitOrAssign<ExampleFlags> for ExampleField
sourcefn bitor_assign(&mut self, rhs: ExampleFlags)
fn bitor_assign(&mut self, rhs: ExampleFlags)
Performs the |=
operation. Read more
sourceimpl BitXor<ExampleFlags> for ExampleFlags
impl BitXor<ExampleFlags> for ExampleFlags
sourceimpl BitXor<ExampleFlags> for ExampleField
impl BitXor<ExampleFlags> for ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the ^
operator.
sourcefn bitxor(self, rhs: ExampleFlags) -> Self::Output
fn bitxor(self, rhs: ExampleFlags) -> Self::Output
Performs the ^
operation. Read more
sourceimpl BitXor<ExampleFlags> for &ExampleField
impl BitXor<ExampleFlags> for &ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the ^
operator.
sourcefn bitxor(self, rhs: ExampleFlags) -> Self::Output
fn bitxor(self, rhs: ExampleFlags) -> Self::Output
Performs the ^
operation. Read more
sourceimpl BitXor<ExampleFlags> for &mut ExampleField
impl BitXor<ExampleFlags> for &mut ExampleField
type Output = ExampleField
type Output = ExampleField
The resulting type after applying the ^
operator.
sourcefn bitxor(self, rhs: ExampleFlags) -> Self::Output
fn bitxor(self, rhs: ExampleFlags) -> Self::Output
Performs the ^
operation. Read more
sourceimpl BitXorAssign<ExampleFlags> for ExampleField
impl BitXorAssign<ExampleFlags> for ExampleField
sourcefn bitxor_assign(&mut self, rhs: ExampleFlags)
fn bitxor_assign(&mut self, rhs: ExampleFlags)
Performs the ^=
operation. Read more
sourceimpl Clone for ExampleFlags
impl Clone for ExampleFlags
sourcefn clone(&self) -> ExampleFlags
fn clone(&self) -> ExampleFlags
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExampleFlags
impl Debug for ExampleFlags
sourceimpl From<ExampleFlags> for u8
impl From<ExampleFlags> for u8
Returns a flag as its corresponding u8
value.
sourcefn from(value: ExampleFlags) -> u8
fn from(value: ExampleFlags) -> u8
Performs the conversion.
sourceimpl From<ExampleFlags> for ExampleField
impl From<ExampleFlags> for ExampleField
Returns a field instance from a flag.
sourcefn from(value: ExampleFlags) -> ExampleField
fn from(value: ExampleFlags) -> ExampleField
Performs the conversion.
sourceimpl From<u8> for ExampleFlags
impl From<u8> for ExampleFlags
Converts a u8
to a flag
Errors
Panics if the supplied u8
is out of range for fields base type.
eg: for a 16-bit field (using u16
),
providing an index of 20
will cause a panic.
sourcefn from(value: u8) -> ExampleFlags
fn from(value: u8) -> ExampleFlags
Performs the conversion.
sourceimpl PartialEq<ExampleFlags> for ExampleFlags
impl PartialEq<ExampleFlags> for ExampleFlags
sourceimpl PartialOrd<ExampleFlags> for ExampleFlags
impl PartialOrd<ExampleFlags> for ExampleFlags
sourcefn partial_cmp(&self, other: &ExampleFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &ExampleFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for ExampleFlags
impl StructuralPartialEq for ExampleFlags
impl TriviallyTransmutable for ExampleFlags
Auto Trait Implementations
impl RefUnwindSafe for ExampleFlags
impl Send for ExampleFlags
impl Sync for ExampleFlags
impl Unpin for ExampleFlags
impl UnwindSafe for ExampleFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more