#[repr(C)]pub struct LineConfig {
pub flags: LineFlags,
pub num_attrs: u32,
pub attrs: LineConfigAttributes,
/* private fields */
}
Expand description
Configuration for a set of requested lines.
Fields§
§flags: LineFlags
Flags for the GPIO lines. This is the default for all requested lines but
may be overridden for particular lines using attrs
.
num_attrs: u32
The number of attributes active in attrs
.
attrs: LineConfigAttributes
The configuration attributes associated with the requested lines.
The number of active attributes in the array is specified by num_attrs
.
Implementations§
Source§impl LineConfig
impl LineConfig
Sourcepub fn attr(&self, idx: usize) -> &LineConfigAttribute
pub fn attr(&self, idx: usize) -> &LineConfigAttribute
The nth attribute in the attrs
Sourcepub fn attr_mut(&mut self, idx: usize) -> &mut LineConfigAttribute
pub fn attr_mut(&mut self, idx: usize) -> &mut LineConfigAttribute
The nth attribute in the attrs
Sourcepub fn add_debounce(&mut self, period: u32, mask: u64)
pub fn add_debounce(&mut self, period: u32, mask: u64)
Add a debounce attribute to the config.
Sourcepub fn add_values(&mut self, values: &LineValues)
pub fn add_values(&mut self, values: &LineValues)
Add a line values attribute to the config.
Trait Implementations§
Source§impl Clone for LineConfig
impl Clone for LineConfig
Source§fn clone(&self) -> LineConfig
fn clone(&self) -> LineConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LineConfig
impl Debug for LineConfig
Source§impl Default for LineConfig
impl Default for LineConfig
Source§fn default() -> LineConfig
fn default() -> LineConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LineConfig
impl RefUnwindSafe for LineConfig
impl Send for LineConfig
impl Sync for LineConfig
impl Unpin for LineConfig
impl UnwindSafe for LineConfig
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