Skip to main content

ModeDesc

Struct ModeDesc 

Source
pub struct ModeDesc<W, H, R, F> {
    pub width: W,
    pub height: H,
    pub refresh_rate: R,
    pub format: F,
    pub scanline_ordering: ModeScanlineOrder,
    pub scaling: ModeScaling,
}

Fields§

§width: W§height: H§refresh_rate: R§format: F§scanline_ordering: ModeScanlineOrder§scaling: ModeScaling

Implementations§

Source§

impl ModeDesc<(), (), (), ()>

Source

pub fn new() -> Self

Source§

impl<W, H, R, F> ModeDesc<W, H, R, F>

Source

pub fn width(self, width: u32) -> ModeDesc<u32, H, R, F>

Source

pub fn height(self, height: u32) -> ModeDesc<W, u32, R, F>

Source

pub fn refresh_rate(self, refresh_rate: Rational) -> ModeDesc<W, H, Rational, F>

Source

pub fn format(self, format: Format) -> ModeDesc<W, H, R, Format>

Source

pub fn scanline_ordering(self, scanline_ordering: ModeScanlineOrder) -> Self

Source

pub fn scaling(self, scaling: ModeScaling) -> Self

Trait Implementations§

Source§

impl<W: Clone, H: Clone, R: Clone, F: Clone> Clone for ModeDesc<W, H, R, F>

Source§

fn clone(&self) -> ModeDesc<W, H, R, F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<W: Debug, H: Debug, R: Debug, F: Debug> Debug for ModeDesc<W, H, R, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<DXGI_MODE_DESC> for ModeDesc<u32, u32, Rational, Format>

Source§

fn from(src: DXGI_MODE_DESC) -> ModeDesc<u32, u32, Rational, Format>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<W, H, R, F> Freeze for ModeDesc<W, H, R, F>
where W: Freeze, H: Freeze, R: Freeze, F: Freeze,

§

impl<W, H, R, F> RefUnwindSafe for ModeDesc<W, H, R, F>

§

impl<W, H, R, F> Send for ModeDesc<W, H, R, F>
where W: Send, H: Send, R: Send, F: Send,

§

impl<W, H, R, F> Sync for ModeDesc<W, H, R, F>
where W: Sync, H: Sync, R: Sync, F: Sync,

§

impl<W, H, R, F> Unpin for ModeDesc<W, H, R, F>
where W: Unpin, H: Unpin, R: Unpin, F: Unpin,

§

impl<W, H, R, F> UnsafeUnpin for ModeDesc<W, H, R, F>

§

impl<W, H, R, F> UnwindSafe for ModeDesc<W, H, R, F>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.