Skip to main content

SevenSegmentPins

Struct SevenSegmentPins 

Source
pub struct SevenSegmentPins<A, B, C, D, E, F, G> {
    pub a: A,
    pub b: B,
    pub c: C,
    pub d: D,
    pub e: E,
    pub f: F,
    pub g: G,
}
Expand description

Pins of the 7-sement display

Pin arrangment:

 ________
|\__a___/|
| |    | |
|f|    |b|
| |____| |
|/  g   \|
|\______/|
| |    | |
|e|    |c|
| |____| |
|/__d___\|

Fields§

§a: A

Upper horizontal bar

§b: B

Upper right vertical bar

§c: C

Lower right vertical bar

§d: D

Lower horizontal bar

§e: E

Lower left vertical bar

§f: F

Upper left vertival bar

§g: G

Middle horizontal bar

Implementations§

Source§

impl<A, B, C, D, E, F, G> SevenSegmentPins<A, B, C, D, E, F, G>

Source

pub fn with_common<Common: Polarity>( self, ) -> SevenSegment<A, B, C, D, E, F, G, Common>

Constructs SevenSegment with specified polarity.

Source

pub fn with_common_cathode(self) -> SevenSegment<A, B, C, D, E, F, G, Cathode>

Shorthand for with_common::<Cathode>().

This prevents you from having to import Cathode or write with_common::<seven_segment::Cathode>()

Source

pub fn with_common_anode(self) -> SevenSegment<A, B, C, D, E, F, G, Anode>

Shorthand for with_common::<Anode>().

This prevents you from having to import Anode or write with_common::<seven_segment::Anode>()

Auto Trait Implementations§

§

impl<A, B, C, D, E, F, G> Freeze for SevenSegmentPins<A, B, C, D, E, F, G>
where A: Freeze, B: Freeze, C: Freeze, D: Freeze, E: Freeze, F: Freeze, G: Freeze,

§

impl<A, B, C, D, E, F, G> RefUnwindSafe for SevenSegmentPins<A, B, C, D, E, F, G>

§

impl<A, B, C, D, E, F, G> Send for SevenSegmentPins<A, B, C, D, E, F, G>
where A: Send, B: Send, C: Send, D: Send, E: Send, F: Send, G: Send,

§

impl<A, B, C, D, E, F, G> Sync for SevenSegmentPins<A, B, C, D, E, F, G>
where A: Sync, B: Sync, C: Sync, D: Sync, E: Sync, F: Sync, G: Sync,

§

impl<A, B, C, D, E, F, G> Unpin for SevenSegmentPins<A, B, C, D, E, F, G>
where A: Unpin, B: Unpin, C: Unpin, D: Unpin, E: Unpin, F: Unpin, G: Unpin,

§

impl<A, B, C, D, E, F, G> UnsafeUnpin for SevenSegmentPins<A, B, C, D, E, F, G>

§

impl<A, B, C, D, E, F, G> UnwindSafe for SevenSegmentPins<A, B, C, D, E, F, G>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.