MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / get_string_field_opt

Method get_string_field_opt

bindings/java/src/main/rust/lib.rs:40–47  ·  view source on GitHub ↗
(&mut self, cfg: &JObject, name: &str)

Source from the content-addressed store, hash-verified

38 }
39
40 fn get_string_field_opt(&mut self, cfg: &JObject, name: &str) -> JNIResult<Option<String>> {
41 let value = self.get_field(cfg, name, "Ljava/lang/String;")?.l()?;
42 if value.is_null() {
43 Ok(None)
44 } else {
45 Ok(Some(self.get_string(&JString::from(value))?.into()))
46 }
47 }
48}
49
50enum Error<E> {

Callers 1

build_inlinerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected