[][src]Struct ssd1306::builder::Builder

pub struct Builder<DSIZE = DisplaySize128x64> where
    DSIZE: DisplaySize
{ /* fields omitted */ }

Builder struct. Driver options and interface are set using its methods.

Implementations

impl Builder[src]

pub fn new() -> Self[src]

Create new builder with a default size of 128 x 64 pixels and no rotation.

impl<DSIZE> Builder<DSIZE> where
    DSIZE: DisplaySize
[src]

pub fn size<S: DisplaySize>(self, size: S) -> Builder<S>[src]

Set the size of the display. Supported sizes are defined by DisplaySize.

pub fn with_rotation(self, rotation: DisplayRotation) -> Self[src]

Set the rotation of the display to one of four values. Defaults to no rotation.

pub fn connect<I>(self, interface: I) -> DisplayProperties<I, DSIZE> where
    I: WriteOnlyDataCommand
[src]

Finish the builder and use some interface communicate with the display

This method consumes the builder and must come last in the method call chain.

use ssd1306::{prelude::*, Builder, I2CDIBuilder};

let interface = I2CDIBuilder::new().init(i2c);
let di: DisplayProperties<_, _> = Builder::new()
    .size(DisplaySize128x32)
    .connect(interface);

Trait Implementations

impl<DSIZE: Clone> Clone for Builder<DSIZE> where
    DSIZE: DisplaySize
[src]

impl<DSIZE: Copy> Copy for Builder<DSIZE> where
    DSIZE: DisplaySize
[src]

impl Default for Builder[src]

Auto Trait Implementations

impl<DSIZE> Send for Builder<DSIZE> where
    DSIZE: Send
[src]

impl<DSIZE> Sync for Builder<DSIZE> where
    DSIZE: Sync
[src]

impl<DSIZE> Unpin for Builder<DSIZE> where
    DSIZE: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.