[][src]Struct jni::strings::JavaStr

pub struct JavaStr<'a: 'b, 'b> { /* fields omitted */ }

Reference to a string in the JVM. Holds a pointer to the array returned by GetStringUTFChars. Calls ReleaseStringUTFChars on Drop. Can be converted to a &JNIStr with the same cost as the &CStr.from_ptr conversion.

Implementations

impl<'a: 'b, 'b> JavaStr<'a, 'b>[src]

pub fn from_env(env: &'b JNIEnv<'a>, obj: JString<'a>) -> Result<Self>[src]

Build a JavaStr from an object and a reference to the environment. You probably want to use JNIEnv::get_string instead.

pub fn get_raw(&self) -> *const c_char[src]

Extract the raw C string pointer from the JavaStr. This will be encoded using the JVM internal CESU-8-style.

Methods from Deref<Target = JNIStr>

Trait Implementations

impl<'a: 'b, 'b> Deref for JavaStr<'a, 'b>[src]

type Target = JNIStr

The resulting type after dereferencing.

impl<'a: 'b, 'b> Drop for JavaStr<'a, 'b>[src]

impl<'a: 'b, 'b: 'c, 'c> From<&'c JavaStr<'a, 'b>> for &'c JNIStr[src]

impl<'a: 'b, 'b: 'c, 'c> From<&'c JavaStr<'a, 'b>> for Cow<'c, str>[src]

impl<'a: 'b, 'b> From<JavaStr<'a, 'b>> for String[src]

Auto Trait Implementations

impl<'a, 'b> RefUnwindSafe for JavaStr<'a, 'b>

impl<'a, 'b> !Send for JavaStr<'a, 'b>

impl<'a, 'b> !Sync for JavaStr<'a, 'b>

impl<'a, 'b> Unpin for JavaStr<'a, 'b> where
    'a: 'b, 

impl<'a, 'b> UnwindSafe for JavaStr<'a, 'b>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.