pub struct Timing {Show 13 fields
pub dot_clock_hz: f64,
pub h_total: u32,
pub h_active: u32,
pub h_blank_start: u32,
pub h_blank_end: u32,
pub h_retrace_start: u32,
pub h_retrace_end: u32,
pub v_total: u32,
pub v_active: u32,
pub v_blank_start: u32,
pub v_blank_end: u32,
pub v_retrace_start: u32,
pub v_retrace_end: u32,
}Expand description
Raster timing of the current video mode, in dots (pixel clock ticks) and scanlines.
Coordinates are relative to the first active dot of the first active line. A line runs
0..h_total: active display 0..h_active, right border up to h_blank_start, blanking
(with horizontal retrace inside it) up to h_blank_end, and the next line’s left border up
to h_total. Vertically the same: active 0..v_active, bottom border up to
v_blank_start, blanking (with vertical retrace) up to v_blank_end, then the top border of
the next frame up to v_total.
Fields§
§dot_clock_hz: f64Dot clock in Hz (25.175 MHz for most VGA modes, 14.318 MHz for CGA, …).
h_total: u32§h_active: u32§h_blank_start: u32§h_blank_end: u32§h_retrace_start: u32§h_retrace_end: u32§v_total: u32§v_active: u32§v_blank_start: u32§v_blank_end: u32§v_retrace_start: u32§v_retrace_end: u32Implementations§
Source§impl Timing
impl Timing
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Clamp the values into a consistent order (registers can be programmed with nonsense).
Sourcepub fn line_rate_hz(&self) -> f64
pub fn line_rate_hz(&self) -> f64
Horizontal scan rate in Hz.
Sourcepub fn refresh_hz(&self) -> f64
pub fn refresh_hz(&self) -> f64
Vertical refresh rate in Hz.
Sourcepub fn visible_size(&self) -> (u32, u32)
pub fn visible_size(&self) -> (u32, u32)
Size of the visible picture (active area plus overscan border) in dots x lines.
Trait Implementations§
impl Copy for Timing
impl StructuralPartialEq for Timing
Auto Trait Implementations§
impl Forget for Timing
impl Freeze for Timing
impl RefUnwindSafe for Timing
impl Send for Timing
impl Sync for Timing
impl Unpin for Timing
impl UnsafeUnpin for Timing
impl UnwindSafe for Timing
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more