Add encode_scan_progress documentation

Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
This commit is contained in:
Honza Rychnovský 2023-09-12 19:36:39 +02:00 committed by GitHub
parent 96aeec2e9d
commit 9b18fe12d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1147,6 +1147,8 @@ pub unsafe extern "C" fn Java_cash_z_ecc_android_sdk_internal_jni_RustBackend_ge
unwrap_exc_or(&env, res, -1)
}
/// Returns a `JniScanProgress` object, provided that numerator is nonnegative, denominator
/// is positive, and the represented ratio is in the range 0.0 to 1.0 inclusive.
fn encode_scan_progress(env: &JNIEnv<'_>, progress: Ratio<u64>) -> Result<jobject, failure::Error> {
let output = env.new_object(
"cash/z/ecc/android/sdk/internal/model/JniScanProgress",