Struct button_driver::ButtonConfig
source · pub struct ButtonConfig {
pub debounce: Duration,
pub release: Duration,
pub hold: Duration,
pub mode: Mode,
}Expand description
Various [Button] parameters.
Fields§
§debounce: DurationHow much time the button should be pressed to in order to count it as a press.
release: DurationHow much time the button should not be holed to be released.
hold: DurationHow much time the button should be pressed to be held.
mode: ModeButton direction.
Implementations§
source§impl ButtonConfig
impl ButtonConfig
Trait Implementations§
source§impl Clone for ButtonConfig
impl Clone for ButtonConfig
source§fn clone(&self) -> ButtonConfig
fn clone(&self) -> ButtonConfig
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 ButtonConfig
impl Debug for ButtonConfig
source§impl Default for ButtonConfig
impl Default for ButtonConfig
source§impl PartialEq<ButtonConfig> for ButtonConfig
impl PartialEq<ButtonConfig> for ButtonConfig
source§fn eq(&self, other: &ButtonConfig) -> bool
fn eq(&self, other: &ButtonConfig) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for ButtonConfig
impl Eq for ButtonConfig
impl StructuralEq for ButtonConfig
impl StructuralPartialEq for ButtonConfig
Auto Trait Implementations§
impl RefUnwindSafe for ButtonConfig
impl Send for ButtonConfig
impl Sync for ButtonConfig
impl Unpin for ButtonConfig
impl UnwindSafe for ButtonConfig
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