Copy as Markdown

Other Tools

// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
::uniffi::setup_scaffolding!("relevancy");
/// Export info about the UDL while used to create us
/// See `uniffi_bindgen::macro_metadata` for how this is used.
// ditto for info about the UDL which spawned us.
const UNIFFI_META_CONST_UDL_RELEVANCY: ::uniffi::MetadataBuffer = ::uniffi::MetadataBuffer::from_code(::uniffi::metadata::codes::UDL_FILE)
.concat_str("relevancy")
.concat_str("relevancy")
.concat_str("relevancy");
#[doc(hidden)]
#[no_mangle]
pub static UNIFFI_META_UDL_RELEVANCY: [u8; UNIFFI_META_CONST_UDL_RELEVANCY.size] = UNIFFI_META_CONST_UDL_RELEVANCY.into_array();
// Enum definitions, corresponding to `enum` in UDL.
#[::uniffi::derive_enum_for_udl(
)]
enum r#Interest {
r#Animals {
},
r#Arts {
},
r#Autos {
},
r#Business {
},
r#Career {
},
r#Education {
},
r#Fashion {
},
r#Finance {
},
r#Food {
},
r#Government {
},
r#Hobbies {
},
r#Home {
},
r#News {
},
r#RealEstate {
},
r#Society {
},
r#Sports {
},
r#Tech {
},
r#Travel {
},
r#Inconclusive {
},
}
// Error definitions, corresponding to `error` in the UDL.
#[::uniffi::derive_error_for_udl(
)]
enum r#RelevancyApiError {
r#Unexpected {
r#reason: String,
},
}
// Record definitions, implemented as method-less structs, corresponding to `dictionary` objects.
#[::uniffi::derive_record_for_udl]
struct r#InterestMetrics {
r#top_single_interest_similarity: u32,
r#top_2interest_similarity: u32,
r#top_3interest_similarity: u32,
}
#[::uniffi::derive_record_for_udl]
struct r#InterestVector {
r#animals: u32,
r#arts: u32,
r#autos: u32,
r#business: u32,
r#career: u32,
r#education: u32,
r#fashion: u32,
r#finance: u32,
r#food: u32,
r#government: u32,
r#hobbies: u32,
r#home: u32,
r#news: u32,
r#real_estate: u32,
r#society: u32,
r#sports: u32,
r#tech: u32,
r#travel: u32,
r#inconclusive: u32,
}
// Top level functions, corresponding to UDL `namespace` functions.// Object definitions, corresponding to UDL `interface` definitions.
#[::uniffi::derive_object_for_udl]
struct r#RelevancyStore { }
#[::uniffi::export_for_udl]
impl r#RelevancyStore {
#[uniffi::constructor]
pub fn r#new(
r#dbpath: String,
) -> std::sync::Arc<r#RelevancyStore>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RelevancyStore {
pub fn r#calculate_metrics(
&self,
) -> ::std::result::Result::<r#InterestMetrics, r#RelevancyApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RelevancyStore {
pub fn r#close(
&self,
)
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RelevancyStore {
pub fn r#ingest(
&self,
r#top_urls: std::vec::Vec<String>,
) -> ::std::result::Result::<r#InterestVector, r#RelevancyApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RelevancyStore {
pub fn r#interrupt(
&self,
)
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RelevancyStore {
pub fn r#user_interest_vector(
&self,
) -> ::std::result::Result::<r#InterestVector, r#RelevancyApiError>
{
unreachable!()
}
}
// Callback Interface definitions, corresponding to UDL `callback interface` definitions.
// External and Wrapped types
// Support for external types.
// Types with an external `FfiConverter`...
// We generate support for each Custom Type and the builtin type it uses.
// Export scaffolding checksums for UDL items
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_relevancy_checksum_method_relevancystore_calculate_metrics() -> u16 {
21184
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_relevancy_checksum_method_relevancystore_close() -> u16 {
8449
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_relevancy_checksum_method_relevancystore_ingest() -> u16 {
18435
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_relevancy_checksum_method_relevancystore_interrupt() -> u16 {
45476
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_relevancy_checksum_method_relevancystore_user_interest_vector() -> u16 {
41000
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_relevancy_checksum_constructor_relevancystore_new() -> u16 {
33202
}