pub struct ForeignLooper { /* private fields */ }
Expand description

A native ALooper *, not necessarily allocated with the current thread.

Implementations

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

Construct a ForeignLooper object from the given pointer.

Safety

By calling this function, you guarantee that the pointer is a valid, non-null pointer to an NDK ffi::ALooper.

Returns a pointer to the NDK ALooper object.

Wakes the looper. An event of Poll::Wake will be sent.

Adds a file descriptor to be polled, without a callback.

See also the NDK docs.

Adds a file descriptor to be polled, with a callback.

The callback takes as an argument the file descriptor, and should return true to continue receiving callbacks, or false to have the callback unregistered.

See also the NDK docs.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.