droid_wrap

Trait 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,

创建空对象。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl JObjNew for &[u8]

Source§

type Fields = ()

Source§

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

Source§

impl JObjNew for &[String]

Source§

type Fields = ()

Source§

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

Source§

impl JObjNew for String

Source§

type Fields = ()

Source§

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

Source§

impl<T: JObjNew> JObjNew for &T

Source§

type Fields = <T as JObjNew>::Fields

Source§

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

Source§

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

Source§

type Fields = <T as JObjNew>::Fields

Source§

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

Source§

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

Source§

type Fields = <T as JObjNew>::Fields

Source§

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

Source§

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

Source§

type Fields = <T as JObjNew>::Fields

Source§

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

Source§

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

Source§

type Fields = <T as JObjNew>::Fields

Source§

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

Implementors§

Source§

impl JObjNew for Activity

Source§

impl JObjNew for PackageManager

Source§

impl JObjNew for ComponentName

Source§

impl JObjNew for Context

Source§

impl JObjNew for ContextWrapper

Source§

impl JObjNew for Intent

Source§

impl JObjNew for Canvas

Source§

impl JObjNew for Point

Source§

impl JObjNew for Rect

Source§

impl JObjNew for SurfaceTexture

Source§

impl JObjNew for Camera

Source§

impl JObjNew for Camera_Area

Source§

impl JObjNew for Camera_CameraInfo

Source§

impl JObjNew for Camera_Face

Source§

impl JObjNew for Camera_Parameters

Source§

impl JObjNew for Camera_Size

Source§

impl JObjNew for AudioManager

Source§

impl JObjNew for Build

Source§

impl JObjNew for Build_VERSION

Source§

impl JObjNew for Build_VERSION_CODES

Source§

impl JObjNew for Bundle

Source§

impl JObjNew for SystemProperties

Source§

impl JObjNew for SystemProperties_Handle

Source§

impl JObjNew for VibrationEffect

Source§

impl JObjNew for Vibrator

Source§

impl JObjNew for VibratorManager

Source§

impl JObjNew for Allocation

Source§

impl JObjNew for RenderScript

Source§

impl JObjNew for TextToSpeech

Source§

impl JObjNew for Manifest_permission

Source§

impl JObjNew for EditorInfo

Source§

impl JObjNew for InputMethodManager

Source§

impl JObjNew for ContextThemeWrapper

Source§

impl JObjNew for Display

Source§

impl JObjNew for InputEvent

Source§

impl JObjNew for KeyEvent

Source§

impl JObjNew for Surface

Source§

impl JObjNew for View

Source§

impl JObjNew for ViewGroup

Source§

impl JObjNew for ViewGroup_LayoutParams

Source§

impl JObjNew for ViewGroup_MarginLayoutParams

Source§

impl JObjNew for Window

Source§

impl JObjNew for Button

Source§

impl JObjNew for EditText

Source§

impl JObjNew for LinearLayout

Source§

impl JObjNew for LinearLayout_LayoutParams

Source§

impl JObjNew for TextView

Source§

impl JObjNew for DexClassLoader

Source§

impl JObjNew for InMemoryDexClassLoader

Source§

impl JObjNew for File

Source§

impl JObjNew for Executable

Source§

impl JObjNew for Method

Source§

impl JObjNew for Boolean

Source§

impl JObjNew for ClassLoader

Source§

impl JObjNew for Float

Source§

impl JObjNew for Integer

Source§

impl JObjNew for Object

Source§

impl JObjNew for System

Source§

impl JObjNew for ByteBuffer