[−][src]Struct windows_win::TimerBuilder
WinAPI timer builder
The same timer can act as one-shot timer and/or interval timer.
Configuration
When single method is called timer is configured as one-shot.
When interval method is called timer is configured as interval.
When both of the above are called timer is configured as one-shot, after which it starts to run in interval.
By default timer starts as one-shot with timeout 0.
Methods
impl<'a> TimerBuilder<'a>[src]
pub fn new() -> Self[src]
Creates new instance
pub fn raw_callback(self, cb: CallbackType, param: Option<*mut c_void>) -> Self[src]
Sets raw C function as callback
pub fn rust_callback(self, cb: fn()) -> Self[src]
Sets Rust function pointer as callback
pub fn queue(self, queue: &'a TimerQueue) -> Self[src]
Sets timer queue.
If not set, default shall be used.
pub fn single(self, delay: c_ulong) -> Self[src]
Makes timer to fire single time after delay in milliseconds.
pub fn interval(self, interval: c_ulong) -> Self[src]
Makes timer to fire with interval in milliseconds.
pub fn flags(self, flags: TimerFlags) -> Self[src]
Specifies timer flags.
Default is raw::timer::DEFAULT_TIMER_FLAGS.
pub fn build(self) -> Result<QueueTimer>[src]
Creates timer.
Auto Trait Implementations
impl<'a> !Send for TimerBuilder<'a>
impl<'a> !Sync for TimerBuilder<'a>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,