pub struct Control { /* private fields */ }Expand description
bitflag struct for the Control value of the packet
Implementations§
Source§impl Control
impl Control
pub const ESTOP: Control
pub const FMS_CONNECTED: Control
pub const ENABLED: Control
pub const TELEOP: Control
pub const TEST: Control
pub const AUTO: Control
Sourcepub fn from_bits(bits: u8) -> Option<Control>
pub fn from_bits(bits: u8) -> Option<Control>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u8) -> Control
pub const fn from_bits_truncate(bits: u8) -> Control
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> Control
pub const unsafe fn from_bits_unchecked(bits: u8) -> Control
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: Control) -> bool
pub const fn intersects(&self, other: Control) -> bool
Returns true if there are flags common to both self and other.
Trait Implementations§
Source§impl BitAndAssign for Control
impl BitAndAssign for Control
Source§fn bitand_assign(&mut self, other: Control)
fn bitand_assign(&mut self, other: Control)
Disables all flags disabled in the set.
Source§impl BitOrAssign for Control
impl BitOrAssign for Control
Source§fn bitor_assign(&mut self, other: Control)
fn bitor_assign(&mut self, other: Control)
Adds the set of flags.
Source§impl BitXorAssign for Control
impl BitXorAssign for Control
Source§fn bitxor_assign(&mut self, other: Control)
fn bitxor_assign(&mut self, other: Control)
Toggles the set of flags.
Source§impl Extend<Control> for Control
impl Extend<Control> for Control
Source§fn extend<T: IntoIterator<Item = Control>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Control>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<Control> for Control
impl FromIterator<Control> for Control
Source§impl Ord for Control
impl Ord for Control
Source§impl PartialOrd for Control
impl PartialOrd for Control
Source§impl SubAssign for Control
impl SubAssign for Control
Source§fn sub_assign(&mut self, other: Control)
fn sub_assign(&mut self, other: Control)
Disables all flags enabled in the set.
impl Copy for Control
impl Eq for Control
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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