Struct gpiocdev_uapi::v2::LineAttribute
source · [−]#[repr(C)]pub struct LineAttribute {
pub kind: LineAttributeKind,
pub value: LineAttributeValueUnion,
/* private fields */
}
Expand description
A configurable attribute of a line.
Fields
kind: LineAttributeKind
The type of attribute stored in value
.
value: LineAttributeValueUnion
The attribute value.
Implementations
sourceimpl LineAttribute
impl LineAttribute
sourcepub fn set_debounce_period_us(&mut self, debounce_period_us: u32)
pub fn set_debounce_period_us(&mut self, debounce_period_us: u32)
Set the attribute as debounce period.
sourcepub fn set_values(&mut self, values: Bitmap<64>)
pub fn set_values(&mut self, values: Bitmap<64>)
Set the attribute as output values.
sourcepub fn to_value(&self) -> Option<LineAttributeValue>
pub fn to_value(&self) -> Option<LineAttributeValue>
Get the contained value.
Converts the unsafe kind/union into a safe enum.
Trait Implementations
sourceimpl Clone for LineAttribute
impl Clone for LineAttribute
sourcefn clone(&self) -> LineAttribute
fn clone(&self) -> LineAttribute
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 moresourceimpl Debug for LineAttribute
impl Debug for LineAttribute
sourceimpl Default for LineAttribute
impl Default for LineAttribute
sourcefn default() -> LineAttribute
fn default() -> LineAttribute
Returns the “default value” for a type. Read more
sourceimpl PartialEq<LineAttribute> for LineAttribute
impl PartialEq<LineAttribute> for LineAttribute
impl Copy for LineAttribute
impl Eq for LineAttribute
Auto Trait Implementations
impl RefUnwindSafe for LineAttribute
impl Send for LineAttribute
impl Sync for LineAttribute
impl Unpin for LineAttribute
impl UnwindSafe for LineAttribute
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more