pub struct SegmentMapping {
pub mapping_type: SegmentMappingType,
pub custom_mapping: Option<[u8; 8]>,
}Expand description
Segment mapping configuration for custom 7-segment display wiring
Fields§
§mapping_type: SegmentMappingTypeThe type of segment mapping being used
custom_mapping: Option<[u8; 8]>Custom bit mapping array (only used when mapping_type is Custom)
Implementations§
Source§impl SegmentMapping
impl SegmentMapping
Sourcepub fn new(mapping_type: SegmentMappingType) -> Self
pub fn new(mapping_type: SegmentMappingType) -> Self
Create a new segment mapping with a predefined type
Sourcepub fn custom(mapping: [u8; 8]) -> Self
pub fn custom(mapping: [u8; 8]) -> Self
Create a new segment mapping with a custom mapping array
Sourcepub fn get_custom_mapping(&self) -> Option<&[u8; 8]>
pub fn get_custom_mapping(&self) -> Option<&[u8; 8]>
Get the mapping array if it’s custom
Trait Implementations§
Source§impl Clone for SegmentMapping
impl Clone for SegmentMapping
Source§fn clone(&self) -> SegmentMapping
fn clone(&self) -> SegmentMapping
Returns a duplicate 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 SegmentMapping
impl Debug for SegmentMapping
Source§impl Default for SegmentMapping
impl Default for SegmentMapping
Source§impl PartialEq for SegmentMapping
impl PartialEq for SegmentMapping
impl StructuralPartialEq for SegmentMapping
Auto Trait Implementations§
impl Freeze for SegmentMapping
impl RefUnwindSafe for SegmentMapping
impl Send for SegmentMapping
impl Sync for SegmentMapping
impl Unpin for SegmentMapping
impl UnsafeUnpin for SegmentMapping
impl UnwindSafe for SegmentMapping
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