TypedStringExt

Trait TypedStringExt 

Source
pub trait TypedStringExt {
    // Required methods
    fn typed_new_string(
        &self,
        s: impl AsRef<str>,
    ) -> LocalObject<'_, JavaString>;
    fn typed_get_string(&self, s: &Object<impl StrongRef, JavaString>) -> String;
}
Expand description

Extension methods for typed string maintenance.

Required Methods§

Source

fn typed_new_string(&self, s: impl AsRef<str>) -> LocalObject<'_, JavaString>

Creates a new string from the given string.

Source

fn typed_get_string(&self, s: &Object<impl StrongRef, JavaString>) -> String

Returns the string slice of the given string object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'vm> TypedStringExt for JNIEnv<'vm>

Implementors§