#[repr(u8)]pub enum Row {
Top = 0,
Bottom = 1,
}Expand description
A row of Buttons.
Variants§
Implementations§
Source§impl Row
impl Row
Sourcepub const fn from_index(idx: usize) -> Row
pub const fn from_index(idx: usize) -> Row
Returns Row::Top if idx == 0, and Row::Bottom if idx == 1.
§Panics
This function will panic if idx is not 0 or 1.
§Examples
let top_row = Row::from_index(0);
assert_eq!(top_row, Row::Top);
let bottom_row = Row::from_index(1);
assert_eq!(bottom_row, Row::Bottom);Trait Implementations§
impl Copy for Row
impl Eq for Row
Source§impl Ord for Row
impl Ord for Row
1.21.0 (const: unstable) · 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 PartialOrd for Row
impl PartialOrd for Row
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
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