#[uniffi::export(async_runtime = "tokio")]
impl NymEnvironment {
#[uniffi::constructor]
pub async fn new(
cache_dir: PathBuf,
network_name: &str,
) -> Result<Self, VpnError> {
todo!()
}
#[uniffi::constructor]
pub fn new_with_mainnet_fallback() -> Result<Self, VpnError> {
todo!()
}
pub async fn __stub_to_keep_compiler_happy(&self) {
// todo: remove after updating to uniffi 0.31
}
}
When trying to create object using new initializer, I get nasty argument mismatch issue.
val env = NymEnvironment(storagePath, "some")
The default initailizer looks like some internal uniffi method that must not be exposed:
constructor(withHandle: UniffiWithHandle, handle: Long) {