Struct mipidsi::options::ModelOptions
source · pub struct ModelOptions { /* private fields */ }
Expand description
ModelOptions hold all the various settings that can impact a particular super::Model
display_size
being set is the minimum requirement.
Implementations§
source§impl ModelOptions
impl ModelOptions
sourcepub fn with_sizes(display_size: (u16, u16), framebuffer_size: (u16, u16)) -> Self
pub fn with_sizes(display_size: (u16, u16), framebuffer_size: (u16, u16)) -> Self
Constructs a ModelOptions with given display and framebuffer sizes
sourcepub fn with_all(
display_size: (u16, u16),
framebuffer_size: (u16, u16),
window_offset_handler: fn(_: &ModelOptions) -> (u16, u16)
) -> Self
pub fn with_all(
display_size: (u16, u16),
framebuffer_size: (u16, u16),
window_offset_handler: fn(_: &ModelOptions) -> (u16, u16)
) -> Self
Constructs a ModelOptions with given display and framebuffer sizes and provided window offset handler
pub fn with_invert_colors(self, invert_colors: bool) -> Self
pub fn invert_command(&self) -> Instruction
sourcepub fn display_size(&self) -> (u16, u16)
pub fn display_size(&self) -> (u16, u16)
Returns display size based on current orientation and display options. Used by models.
sourcepub fn framebuffer_size(&self) -> (u16, u16)
pub fn framebuffer_size(&self) -> (u16, u16)
Returns framebuffer size based on current orientation and display options. Used by models. Uses display_size if framebuffer_size is not set.
sourcepub fn window_offset(&mut self) -> (u16, u16)
pub fn window_offset(&mut self) -> (u16, u16)
Returns window offset (x, y) based on current orientation and display options. Used by [Display::set_address_window]
pub fn orientation(&self) -> Orientation
sourcepub fn set_orientation(&mut self, orientation: Orientation)
pub fn set_orientation(&mut self, orientation: Orientation)
Sets the current Orientation
Trait Implementations§
source§impl Clone for ModelOptions
impl Clone for ModelOptions
source§fn clone(&self) -> ModelOptions
fn clone(&self) -> ModelOptions
Returns a copy 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 moreAuto Trait Implementations§
impl RefUnwindSafe for ModelOptions
impl Send for ModelOptions
impl Sync for ModelOptions
impl Unpin for ModelOptions
impl UnwindSafe for ModelOptions
Blanket Implementations§
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.