(&self)
| 243 | /// @returns {string} The type of the plaintext. |
| 244 | #[wasm_bindgen(js_name = "plaintextType")] |
| 245 | pub fn plaintext_type(&self) -> String { |
| 246 | match &self.0 { |
| 247 | PlaintextNative::Literal(literal, _) => literal.to_type().type_name().to_string(), |
| 248 | PlaintextNative::Struct(..) => "struct".to_string(), |
| 249 | PlaintextNative::Array(..) => "array".to_string(), |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | /// Attempt to convert the plaintext to a JS object. |
| 254 | /// |