pub struct Field<'env: 'borrow, 'borrow, T>where
    T: Signature,{ /* private fields */ }

Implementations§

source§

impl<'env: 'borrow, 'borrow, T> Field<'env, 'borrow, T>where T: Signature,

source

pub fn new( env: &'borrow JNIEnv<'env>, obj: JObject<'env>, classpath_path: &str, field_name: &str ) -> Option<Self>

source§

impl<'env: 'borrow, 'borrow, T> Field<'env, 'borrow, T>where T: Signature + TryIntoJavaValue<'env> + TryFromJavaValue<'env, 'borrow>, <T as TryFromJavaValue<'env, 'borrow>>::Source: TryFrom<JValueWrapper<'env>, Error = JniError>, JValue<'env>: From<<T as TryIntoJavaValue<'env>>::Target>,

source

pub fn set(&mut self, value: T) -> JniResult<()>

source

pub fn get(&self) -> JniResult<T>

source

pub fn field_try_from( source: JObject<'env>, classpath_path: &str, field_name: &str, env: &'borrow JNIEnv<'env> ) -> JniResult<Self>

source§

impl<'env: 'borrow, 'borrow, T> Field<'env, 'borrow, T>where T: Signature + IntoJavaValue<'env> + FromJavaValue<'env, 'borrow>, <T as FromJavaValue<'env, 'borrow>>::Source: TryFrom<JValueWrapper<'env>, Error = JniError>, JValue<'env>: From<<T as IntoJavaValue<'env>>::Target>,

source

pub fn set_unchecked(&mut self, value: T)

source

pub fn get_unchecked(&self) -> T

source

pub fn field_from( source: JObject<'env>, classpath_path: &str, field_name: &str, env: &'borrow JNIEnv<'env> ) -> Self

Trait Implementations§

source§

impl<'env: 'borrow, 'borrow, T> Clone for Field<'env, 'borrow, T>where T: Signature + Clone,

source§

fn clone(&self) -> Field<'env, 'borrow, T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'env: 'borrow, 'borrow, T> Signature for Field<'env, 'borrow, T>where T: Signature,

source§

const SIG_TYPE: &'static str = <T as Signature>::SIG_TYPE

Java type signature for the implementing type.

Auto Trait Implementations§

§

impl<'env, 'borrow, T> RefUnwindSafe for Field<'env, 'borrow, T>where T: RefUnwindSafe,

§

impl<'env, 'borrow, T> !Send for Field<'env, 'borrow, T>

§

impl<'env, 'borrow, T> !Sync for Field<'env, 'borrow, T>

§

impl<'env, 'borrow, T> Unpin for Field<'env, 'borrow, T>where T: Unpin, 'env: 'borrow,

§

impl<'env, 'borrow, T> UnwindSafe for Field<'env, 'borrow, T>where T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<'a, T> Desc<'a, T> for T

source§

fn lookup(self, _: &JNIEnv<'a>) -> Result<T, Error>

Look up the concrete type from the JVM.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.