Struct ssd1306::builder::I2CDIBuilder[][src]

pub struct I2CDIBuilder { /* fields omitted */ }

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

Implementations

impl I2CDIBuilder[src]

pub fn new() -> Self[src]

Create new builder with a default I2C address of 0x3C

pub fn with_i2c_addr(self, i2c_addr: u8) -> Self[src]

Set the I2C address to use

I2CDIBuilder defaults to an address of 0x3C which is the most common address. The other address specified in the datasheet is 0x3D which can be set using this method.

pub fn init<I: Write>(self, i2c: I) -> I2CInterface<I>[src]

Finish the builder and return an initialised display interface for further use

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

Trait Implementations

impl Clone for I2CDIBuilder[src]

impl Copy for I2CDIBuilder[src]

impl Default for I2CDIBuilder[src]

Auto Trait Implementations

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.