#[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§
Source§impl 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: u64)
pub fn set_values(&mut self, values: u64)
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§
Source§impl Clone for LineAttribute
impl Clone for LineAttribute
Source§fn clone(&self) -> LineAttribute
fn clone(&self) -> LineAttribute
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 LineAttribute
impl Debug for LineAttribute
Source§impl Default for LineAttribute
impl Default for LineAttribute
Source§fn default() -> LineAttribute
fn default() -> LineAttribute
Returns the “default value” for a type. Read more
Source§impl PartialEq for LineAttribute
impl PartialEq for LineAttribute
impl Copy for LineAttribute
impl Eq for LineAttribute
Auto Trait Implementations§
impl Freeze for LineAttribute
impl RefUnwindSafe for LineAttribute
impl Send for LineAttribute
impl Sync for LineAttribute
impl Unpin for LineAttribute
impl UnwindSafe for LineAttribute
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