Struct jni::objects::JByteBuffer

source ·
#[repr(transparent)]
pub struct JByteBuffer<'local>(_);
Expand description

Lifetime’d representation of a jobject that is an instance of the ByteBuffer Java class. Just a JObject wrapped in a new class.

Implementations§

source§

impl<'local> JByteBuffer<'local>

source

pub unsafe fn from_raw(raw: jobject) -> Self

Creates a JByteBuffer that wraps the given raw jobject

Safety

No runtime check is made to verify that the given jobject is an instance of a ByteBuffer.

source

pub fn into_raw(self) -> jobject

Unwrap to the raw jni type.

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

source

pub fn as_raw(&self) -> jobject

Returns the raw JNI pointer.

Trait Implementations§

source§

impl<'local> AsRef<JByteBuffer<'local>> for JByteBuffer<'local>

source§

fn as_ref(&self) -> &JByteBuffer<'local>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'local> AsRef<JObject<'local>> for JByteBuffer<'local>

source§

fn as_ref(&self) -> &JObject<'local>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'local> Debug for JByteBuffer<'local>

source§

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

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

impl<'local> Default for JByteBuffer<'local>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'local> Deref for JByteBuffer<'local>

§

type Target = JObject<'local>

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl<'local, 'obj_ref> From<&'obj_ref JObject<'local>> for &'obj_ref JByteBuffer<'local>

source§

fn from(other: &'obj_ref JObject<'local>) -> Self

Converts to this type from the input type.
source§

impl<'local> From<JByteBuffer<'local>> for JObject<'local>

source§

fn from(other: JByteBuffer<'_>) -> JObject<'_>

Converts to this type from the input type.
source§

impl<'local> From<JObject<'local>> for JByteBuffer<'local>

source§

fn from(other: JObject<'_>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'local> RefUnwindSafe for JByteBuffer<'local>

§

impl<'local> Send for JByteBuffer<'local>where 'local: 'static,

§

impl<'local> Sync for JByteBuffer<'local>where 'local: 'static,

§

impl<'local> Unpin for JByteBuffer<'local>

§

impl<'local> UnwindSafe for JByteBuffer<'local>

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