Trait droid_wrap::JObjNew

source ·
pub trait JObjNew {
    type Fields: Default;

    // Required method
    fn _new(this: &GlobalRef, fields: Self::Fields) -> Self;

    // Provided method
    fn null() -> Self
       where Self: Sized,
             Self::Fields: Default { ... }
}
Expand description

用于从java对象创建本地对象。

Required Associated Types§

source

type Fields: Default

字段类型

Required Methods§

source

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

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

Provided Methods§

source

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

创建空对象。

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl JObjNew for String

§

type Fields = ()

source§

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

source§

impl<T: JObjNew> JObjNew for &T

§

type Fields = <T as JObjNew>::Fields

source§

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

source§

impl<T: JObjNew> JObjNew for Rc<T>

§

type Fields = <T as JObjNew>::Fields

source§

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

source§

impl<T: JObjNew> JObjNew for Arc<T>

§

type Fields = <T as JObjNew>::Fields

source§

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

source§

impl<T: JObjNew> JObjNew for Mutex<T>

§

type Fields = <T as JObjNew>::Fields

source§

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

source§

impl<T: JObjRef + JObjNew> JObjNew for Option<T>

§

type Fields = <T as JObjNew>::Fields

source§

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

Implementors§

source§

impl JObjNew for Activity

§

type Fields = ()

source§

impl JObjNew for Context

§

type Fields = ()

source§

impl JObjNew for ContextWrapper

§

type Fields = ()

source§

impl JObjNew for Intent

§

type Fields = ()

source§

impl JObjNew for AudioManager

§

type Fields = ()

source§

impl JObjNew for Build

§

type Fields = ()

source§

impl JObjNew for Build_VERSION

§

type Fields = ()

source§

impl JObjNew for Build_VERSION_CODES

§

type Fields = ()

source§

impl JObjNew for Bundle

§

type Fields = ()

source§

impl JObjNew for SystemProperties

§

type Fields = ()

source§

impl JObjNew for SystemProperties_Handle

§

type Fields = ()

source§

impl JObjNew for VibrationEffect

§

type Fields = ()

source§

impl JObjNew for Vibrator

§

type Fields = ()

source§

impl JObjNew for VibratorManager

§

type Fields = ()

source§

impl JObjNew for TextToSpeech

§

type Fields = ()

source§

impl JObjNew for EditorInfo

§

type Fields = ()

source§

impl JObjNew for InputMethodManager

§

type Fields = ()

source§

impl JObjNew for Display

§

type Fields = ()

source§

impl JObjNew for InputEvent

§

type Fields = ()

source§

impl JObjNew for KeyEvent

§

type Fields = ()

source§

impl JObjNew for View

§

type Fields = ()

source§

impl JObjNew for ViewGroup

§

type Fields = ()

source§

impl JObjNew for ViewGroup_LayoutParams

§

type Fields = ()

source§

impl JObjNew for ViewGroup_MarginLayoutParams

§

type Fields = ()

source§

impl JObjNew for Button

§

type Fields = ()

source§

impl JObjNew for EditText

§

type Fields = ()

source§

impl JObjNew for LinearLayout

§

type Fields = ()

source§

impl JObjNew for LinearLayout_LayoutParams

§

type Fields = ()

source§

impl JObjNew for TextView

§

type Fields = ()

source§

impl JObjNew for DexClassLoader

§

type Fields = ()

source§

impl JObjNew for InMemoryDexClassLoader

§

type Fields = ()

source§

impl JObjNew for File

§

type Fields = ()

source§

impl JObjNew for Executable

§

type Fields = ()

source§

impl JObjNew for Method

§

type Fields = ()

source§

impl JObjNew for Boolean

§

type Fields = ()

source§

impl JObjNew for ClassLoader

§

type Fields = ()

source§

impl JObjNew for Float

§

type Fields = ()

source§

impl JObjNew for Integer

§

type Fields = ()

source§

impl JObjNew for Object

§

type Fields = ()

source§

impl JObjNew for System

§

type Fields = ()

source§

impl JObjNew for ByteBuffer

§

type Fields = ()