[−][src]Struct jni::strings::JavaStr
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]
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,
'a: 'b,
impl<'a, 'b> UnwindSafe for JavaStr<'a, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,