pub struct Object<'a> { /* private fields */ }
Expand description
A struct wrapping a JObject
Implementations§
source§impl<'a> Object<'a>
impl<'a> Object<'a>
sourcepub fn call_method(
&self,
name: &str,
signature: Signature<'_>,
args: &[Value<'_>]
) -> Result<JValueGen<JObject<'_>>>
pub fn call_method( &self, name: &str, signature: Signature<'_>, args: &[Value<'_>] ) -> Result<JValueGen<JObject<'_>>>
Calls a method on the object
Arguments
name
- The name of the methodsignature
- The signature of the methodargs
- The arguments to pass to the method
sourcepub fn set_field(
&self,
name: &str,
type: Type<'_>,
value: Value<'_>
) -> Result<()>
pub fn set_field( &self, name: &str, type: Type<'_>, value: Value<'_> ) -> Result<()>
Sets a field on the object
Arguments
name
- The name of the fieldvalue
- The value to set the field to
sourcepub fn get_object(&self) -> &'a JObject<'a>
pub fn get_object(&self) -> &'a JObject<'a>
Gets the wrapped object
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Object<'a>
impl<'a> !Send for Object<'a>
impl<'a> !Sync for Object<'a>
impl<'a> Unpin for Object<'a>
impl<'a> UnwindSafe for Object<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more