[][src]Struct android_ndk::looper::ThreadLooper

pub struct ThreadLooper { /* fields omitted */ }

A thread-local ALooper. This contains no real data; just the promise that there is a looper associated with the current thread.

Methods

impl ThreadLooper[src]

pub fn for_thread() -> Option<Self>[src]

Returns the looper associated with the current thread, if any.

pub unsafe fn new_unchecked() -> Self[src]

Create a ThreadLooper without checking that there is one associated with the current thread.

pub fn poll_once(&self) -> Result<Poll, PollError>[src]

Polls the looper, blocking on processing an event.

pub fn poll_once_timeout(&self, timeout: Duration) -> Result<Poll, PollError>[src]

Polls the looper, blocking on processing an event, but with a timeout. Give a timeout of 0 to make this non-blocking.

It panics if the timeout is larger than expressible as an i32 of milliseconds (roughly 25 days).

pub fn poll_all(&self) -> Result<Poll, PollError>[src]

Repeatedly polls the looper, blocking on processing an event.

This function will never return Poll::Callback.

pub fn poll_all_timeout(&self, timeout: Duration) -> Result<Poll, PollError>[src]

Repeatedly polls the looper, blocking on processing an event, but with a timeout. Give a timeout of 0 to make this non-blocking.

This function will never return Poll::Callback.

It panics if the timeout is larger than expressible as an i32 of milliseconds (roughly 25 days).

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]