[−][src]Struct android_ndk::looper::ThreadLooper
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
impl Unpin for ThreadLooper
impl !Sync for ThreadLooper
impl !Send for ThreadLooper
impl UnwindSafe for ThreadLooper
impl RefUnwindSafe for ThreadLooper
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,