Struct mipidsi::options::ModelOptions
source · pub struct ModelOptions { /* private fields */ }
Expand description
ModelOptions holds the settings for Models.
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
Creates model options for the given display and framebuffer sizes.
All other settings are initialized to their default value.
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
Creates model options for the given sizes and offset handler.
sourcepub fn set_invert_colors(&mut self, color_inversion: ColorInversion)
pub fn set_invert_colors(&mut self, color_inversion: ColorInversion)
Sets the color inversion setting.
sourcepub fn orientation(&self) -> Orientation
pub fn orientation(&self) -> Orientation
Returns the current orientation.
sourcepub fn set_orientation(&mut self, orientation: Orientation)
pub fn set_orientation(&mut self, orientation: Orientation)
Sets the 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 moresource§impl From<&ModelOptions> for SetAddressMode
impl From<&ModelOptions> for SetAddressMode
source§fn from(options: &ModelOptions) -> Self
fn from(options: &ModelOptions) -> Self
Converts to this type from the input type.
source§impl From<&ModelOptions> for SetScrollArea
impl From<&ModelOptions> for SetScrollArea
source§fn from(options: &ModelOptions) -> Self
fn from(options: &ModelOptions) -> Self
Converts to this type from the input type.
Auto 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> 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
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.