Struct droid_wrap::android::os::SystemProperties_Handle

source ·
pub struct SystemProperties_Handle { /* private fields */ }
Expand description

预定位属性的句柄。提前查找属性句柄可以实现对单个属性的最佳重复查找。

Implementations§

source§

impl SystemProperties_Handle

source

pub fn get(&self) -> String

返回属性的值

source

pub fn get_int(&self, def: i32) -> i32

返回int值或def在解析错误上 def 默认值

source

pub fn get_long(&self, def: i64) -> i64

返回long值或def在解析错误上 def 默认值

source

pub fn get_boolean(&self, def: bool) -> bool

返回boolean值或def在解析错误上 def 默认值

Methods from Deref<Target = GlobalRef>§

source

pub fn as_obj(&self) -> &JObject<'static>

Get the object from the global ref

This borrows the ref and prevents it from being dropped as long as the JObject sticks around.

Methods from Deref<Target = JObject<'static>>§

source

pub fn as_raw(&self) -> *mut _jobject

Returns the raw JNI pointer.

Trait Implementations§

source§

impl Debug for SystemProperties_Handle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for SystemProperties_Handle

§

type Target = GlobalRef

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl From<&GlobalRef> for SystemProperties_Handle

source§

fn from(obj: &GlobalRef) -> Self

Converts to this type from the input type.
source§

impl Into<GlobalRef> for &SystemProperties_Handle

source§

fn into(self) -> GlobalRef

Converts this type into the (usually inferred) input type.
source§

impl JObjNew for SystemProperties_Handle

§

type Fields = ()

字段类型
source§

fn _new(this: &GlobalRef, fields: Self::Fields) -> Self

从java对象创建本地对象。 this java对象引用。
source§

fn null() -> Self
where Self: Sized, Self::Fields: Default,

创建空对象。
source§

impl JObjRef for SystemProperties_Handle

source§

fn java_ref(&self) -> GlobalRef

获取java对象引用。
source§

impl JType for SystemProperties_Handle

§

type Error = Error

错误类型。
source§

const CLASS: &'static str = "android/os/SystemProperties_Handle"

java类的名称。
source§

const OBJECT_SIG: &'static str = "Landroid/os/SystemProperties_Handle;"

对象的签名描述。
source§

impl PartialEq for SystemProperties_Handle

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToString for SystemProperties_Handle

source§

fn to_string(&self) -> String

Converts the given value to a String. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.