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

A native AConfiguration *

Configuration is an opaque type used to get and set various subsystem configurations.

Implementations

Construct a Configuration from a pointer.

Safety

By calling this function, you assert that it is a valid pointer to a native AConfiguration, and give ownership of it to the Configuration instance.

Create a new Configuration, with the same contents as the AConfiguration referenced by the pointer.

This is useful if you have a pointer, but not ownership of it.

Safety

By calling this function, you assert that it is a valid pointer to a native AConfiguration.

The pointer to the native AConfiguration. Keep in mind that the Configuration object still has ownership, and will free it when dropped.

Create a new Configuration, with none of the values set.

dest.copy(&src) copies the contents of src to dest

Information about what fields differ between the two configurations

Returns false if anything in self conflicts with requested

Returns the country code, as a String of two characters, if set

Returns the screen density in dpi.

On some devices it can return values outside of the density enum.

Returns the keyboard type.

Returns keyboard visibility/availability.

Returns the language, as a String of two characters, if set

Returns the layout direction

Returns the mobile country code.

Returns the mobile network code, if one is defined

Available on crate feature api-level-30 only.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.