MCPcopy Create free account
hub / github.com/cedar-policy/cedar-java / parse

Method parse

CedarJavaFFI/src/objects.rs:117–125  ·  view source on GitHub ↗

Attempt to parse an EntityTypeName from a string, and allocate the result as a Java object

(env: &mut JNIEnv<'a>, src: &str)

Source from the content-addressed store, hash-verified

115
116 /// Attempt to parse an EntityTypeName from a string, and allocate the result as a Java object
117 pub fn parse(env: &mut JNIEnv<'a>, src: &str) -> Result<JOptional<'a, Self>> {
118 match EntityTypeName::from_str(src) {
119 Ok(etype) => {
120 let jetype = Self::try_from(env, &etype)?;
121 JOptional::of(env, jetype)
122 }
123 Err(_) => JOptional::empty(env),
124 }
125 }
126}
127
128impl<'a> Object<'a> for JEntityTypeName<'a> {

Callers 5

preparsePolicySetJniFunction · 0.45
newMethod · 0.45
castMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected