field_ios

In-the-field app for Radroots on iOS
git clone https://radroots.dev/git/field_ios.git
Log | Files | Refs | README | LICENSE

lib.rs (2127B)


      1 // UniFFI serializes the complete versioned error record across the language
      2 // boundary; keeping it by value preserves the generated wire contract.
      3 #![allow(clippy::result_large_err)]
      4 #![cfg_attr(coverage_nightly, feature(coverage_attribute))]
      5 
      6 uniffi::setup_scaffolding!("tera_core");
      7 
      8 mod backup;
      9 mod restore;
     10 pub use restore::*;
     11 mod composer;
     12 pub use backup::*;
     13 mod draft_inventory;
     14 mod draft_status;
     15 pub use draft_status::*;
     16 mod dto;
     17 mod invalidation;
     18 pub mod logging;
     19 mod media_file;
     20 pub use runtime::FfiMediaCacheCleanup;
     21 mod media_inventory;
     22 mod operations;
     23 mod revision_status;
     24 pub use revision_status::*;
     25 mod recovery;
     26 mod recovery_inventory;
     27 mod runtime;
     28 mod signer;
     29 mod submission;
     30 mod subscription;
     31 mod subscription_queue;
     32 
     33 pub use composer::*;
     34 pub use draft_inventory::*;
     35 pub use dto::*;
     36 pub use error::{TeraAppError, TeraErrorRecord};
     37 pub use invalidation::*;
     38 pub use media_file::FfiMediaFile;
     39 pub use media_inventory::*;
     40 pub use operations::*;
     41 pub use recovery::*;
     42 pub use recovery_inventory::*;
     43 pub use runtime::{
     44     FfiAuthorVisibility, FfiAuthorVisibilityEntry, FfiAuthorVisibilityPolicy,
     45     FfiNativeRecoveryReason, FfiNativeRecoverySchedule, FfiNativeRecoveryStatus,
     46     FfiRecoveryCompletionReceipt, FfiRecoveryUploadReceipt, FfiRestoreStore,
     47     FfiRevisionSourceRequest, ProtectedDataAvailability, TeraRuntime,
     48     restore_local_application_backup,
     49 };
     50 pub use signer::{
     51     HostSigningOutcome, HostSigningPurpose, HostSigningRequest, HostSigningResult,
     52     SignerAvailabilityRecord, SignerStatusRecord, TeraHostSigner,
     53 };
     54 pub use submission::*;
     55 pub use subscription::{FfiSubscriptionHandle, TeraRuntimeObserver};
     56 
     57 mod error;
     58 
     59 #[allow(
     60     clippy::if_same_then_else,
     61     reason = "coverage probe intentionally exercises both paths with a stable value"
     62 )]
     63 pub fn coverage_branch_probe(input: bool) -> &'static str {
     64     if input { "ffi" } else { "ffi" }
     65 }
     66 
     67 #[cfg(test)]
     68 mod tests {
     69     use super::coverage_branch_probe;
     70 
     71     #[test]
     72     fn coverage_branch_probe_hits_both_paths() {
     73         assert_eq!(coverage_branch_probe(true), "ffi");
     74         assert_eq!(coverage_branch_probe(false), "ffi");
     75     }
     76 }