mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-01-13 19:50:28 +00:00
5032 lines
193 KiB
Rust
5032 lines
193 KiB
Rust
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.11.1.
|
|
|
|
#![allow(
|
|
non_camel_case_types,
|
|
unused,
|
|
non_snake_case,
|
|
clippy::needless_return,
|
|
clippy::redundant_closure_call,
|
|
clippy::redundant_closure,
|
|
clippy::useless_conversion,
|
|
clippy::unit_arg,
|
|
clippy::unused_unit,
|
|
clippy::double_parens,
|
|
clippy::let_and_return,
|
|
clippy::too_many_arguments,
|
|
clippy::match_single_binding,
|
|
clippy::clone_on_copy,
|
|
clippy::let_unit_value,
|
|
clippy::deref_addrof,
|
|
clippy::explicit_auto_deref,
|
|
clippy::borrow_deref_ref,
|
|
clippy::needless_borrow
|
|
)]
|
|
|
|
// Section: imports
|
|
|
|
use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
|
|
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
|
|
use flutter_rust_bridge::{Handler, IntoIntoDart};
|
|
|
|
// Section: boilerplate
|
|
|
|
flutter_rust_bridge::frb_generated_boilerplate!(
|
|
default_stream_sink_codec = DcoCodec,
|
|
default_rust_opaque = RustOpaqueNom,
|
|
default_rust_auto_opaque = RustAutoOpaqueNom,
|
|
);
|
|
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.11.1";
|
|
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1482626931;
|
|
|
|
// Section: executor
|
|
|
|
flutter_rust_bridge::frb_generated_default_handler!();
|
|
|
|
// Section: wire_funcs
|
|
|
|
fn wire__crate__api__win32_api__add_nvme_patch_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "add_nvme_patch",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::add_nvme_patch()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__check_nvme_patch_status_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "check_nvme_patch_status",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::check_nvme_patch_status()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__ort_api__clear_all_models_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "clear_all_models",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::ort_api::clear_all_models()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__create_desktop_shortcut_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
target_path: impl CstDecode<String>,
|
|
shortcut_name: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "create_desktop_shortcut",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_target_path = target_path.cst_decode();
|
|
let api_shortcut_name = shortcut_name.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::create_desktop_shortcut(
|
|
&api_target_path,
|
|
&api_shortcut_name,
|
|
)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__http_api__dns_lookup_ips_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
host: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "dns_lookup_ips",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_host = host.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::http_api::dns_lookup_ips(api_host).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__http_api__dns_lookup_txt_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
host: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "dns_lookup_txt",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_host = host.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::http_api::dns_lookup_txt(api_host).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__download_global_stat_default_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "download_global_stat_default",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::downloader_api::DownloadGlobalStat::default(),
|
|
)?;
|
|
Ok(output_ok)
|
|
})())
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_add_magnet_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
magnet_link: impl CstDecode<String>,
|
|
output_folder: impl CstDecode<Option<String>>,
|
|
trackers: impl CstDecode<Option<Vec<String>>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_add_magnet",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_magnet_link = magnet_link.cst_decode();
|
|
let api_output_folder = output_folder.cst_decode();
|
|
let api_trackers = trackers.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_add_magnet(
|
|
api_magnet_link,
|
|
api_output_folder,
|
|
api_trackers,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_add_torrent_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
torrent_bytes: impl CstDecode<Vec<u8>>,
|
|
output_folder: impl CstDecode<Option<String>>,
|
|
trackers: impl CstDecode<Option<Vec<String>>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_add_torrent",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_torrent_bytes = torrent_bytes.cst_decode();
|
|
let api_output_folder = output_folder.cst_decode();
|
|
let api_trackers = trackers.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_add_torrent(
|
|
api_torrent_bytes,
|
|
api_output_folder,
|
|
api_trackers,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_add_url_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
url: impl CstDecode<String>,
|
|
output_folder: impl CstDecode<Option<String>>,
|
|
trackers: impl CstDecode<Option<Vec<String>>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_add_url",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_url = url.cst_decode();
|
|
let api_output_folder = output_folder.cst_decode();
|
|
let api_trackers = trackers.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_add_url(
|
|
api_url,
|
|
api_output_folder,
|
|
api_trackers,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_clear_completed_tasks_cache_impl(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_clear_completed_tasks_cache",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok({
|
|
crate::api::downloader_api::downloader_clear_completed_tasks_cache();
|
|
})?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_get_all_tasks_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_get_all_tasks",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::downloader_api::downloader_get_all_tasks().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_get_completed_tasks_cache_impl(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_get_completed_tasks_cache",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::downloader_api::downloader_get_completed_tasks_cache(),
|
|
)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_get_global_stats_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_get_global_stats",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::downloader_api::downloader_get_global_stats().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_get_task_info_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
task_id: impl CstDecode<usize>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_get_task_info",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_task_id = task_id.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::downloader_api::downloader_get_task_info(api_task_id)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_has_active_tasks_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_has_active_tasks",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, ()>(
|
|
(move || async move {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::downloader_api::downloader_has_active_tasks().await,
|
|
)?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_has_pending_session_tasks_impl(
|
|
working_dir: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_has_pending_session_tasks",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_working_dir = working_dir.cst_decode();
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::downloader_api::downloader_has_pending_session_tasks(
|
|
api_working_dir,
|
|
),
|
|
)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_init_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
working_dir: impl CstDecode<String>,
|
|
default_download_dir: impl CstDecode<String>,
|
|
upload_limit_bps: impl CstDecode<Option<u32>>,
|
|
download_limit_bps: impl CstDecode<Option<u32>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_init",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_working_dir = working_dir.cst_decode();
|
|
let api_default_download_dir = default_download_dir.cst_decode();
|
|
let api_upload_limit_bps = upload_limit_bps.cst_decode();
|
|
let api_download_limit_bps = download_limit_bps.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_init(
|
|
api_working_dir,
|
|
api_default_download_dir,
|
|
api_upload_limit_bps,
|
|
api_download_limit_bps,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_is_initialized_impl(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_is_initialized",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok =
|
|
Result::<_, ()>::Ok(crate::api::downloader_api::downloader_is_initialized())?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_is_name_in_task_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
name: impl CstDecode<String>,
|
|
downloading_only: impl CstDecode<Option<bool>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_is_name_in_task",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_name = name.cst_decode();
|
|
let api_downloading_only = downloading_only.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, ()>(
|
|
(move || async move {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::downloader_api::downloader_is_name_in_task(
|
|
api_name,
|
|
api_downloading_only,
|
|
)
|
|
.await,
|
|
)?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_pause_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
task_id: impl CstDecode<usize>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_pause",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_task_id = task_id.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::downloader_api::downloader_pause(api_task_id).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_pause_all_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_pause_all",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_pause_all().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_remove_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
task_id: impl CstDecode<usize>,
|
|
delete_files: impl CstDecode<bool>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_remove",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_task_id = task_id.cst_decode();
|
|
let api_delete_files = delete_files.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_remove(
|
|
api_task_id,
|
|
api_delete_files,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_remove_completed_tasks_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_remove_completed_tasks",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::downloader_api::downloader_remove_completed_tasks().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_resume_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
task_id: impl CstDecode<usize>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_resume",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_task_id = task_id.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::downloader_api::downloader_resume(api_task_id).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_resume_all_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_resume_all",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_resume_all().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_shutdown_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_shutdown",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_shutdown().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_stop_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_stop",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_stop().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__downloader_api__downloader_update_speed_limits_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
_upload_limit_bps: impl CstDecode<Option<u32>>,
|
|
_download_limit_bps: impl CstDecode<Option<u32>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "downloader_update_speed_limits",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api__upload_limit_bps = _upload_limit_bps.cst_decode();
|
|
let api__download_limit_bps = _download_limit_bps.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::downloader_api::downloader_update_speed_limits(
|
|
api__upload_limit_bps,
|
|
api__download_limit_bps,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__http_api__fetch_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
method: impl CstDecode<crate::api::http_api::MyMethod>,
|
|
url: impl CstDecode<String>,
|
|
headers: impl CstDecode<Option<std::collections::HashMap<String, String>>>,
|
|
input_data: impl CstDecode<Option<Vec<u8>>>,
|
|
with_ip_address: impl CstDecode<Option<String>>,
|
|
with_custom_dns: impl CstDecode<Option<bool>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "fetch",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_method = method.cst_decode();
|
|
let api_url = url.cst_decode();
|
|
let api_headers = headers.cst_decode();
|
|
let api_input_data = input_data.cst_decode();
|
|
let api_with_ip_address = with_ip_address.cst_decode();
|
|
let api_with_custom_dns = with_custom_dns.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::http_api::fetch(
|
|
api_method,
|
|
api_url,
|
|
api_headers,
|
|
api_input_data,
|
|
api_with_ip_address,
|
|
api_with_custom_dns,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_disk_physical_sector_size_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
drive_letter: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_disk_physical_sector_size",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_drive_letter = drive_letter.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::get_disk_physical_sector_size(
|
|
&api_drive_letter,
|
|
)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__http_api__get_faster_url_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
urls: impl CstDecode<Vec<String>>,
|
|
path_suffix: impl CstDecode<Option<String>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_faster_url",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_urls = urls.cst_decode();
|
|
let api_path_suffix = path_suffix.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::http_api::get_faster_url(api_urls, api_path_suffix).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_gpu_info_from_registry_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_gpu_info_from_registry",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::get_gpu_info_from_registry()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_number_of_logical_processors_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_number_of_logical_processors",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::get_number_of_logical_processors()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_process_list_by_name_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
process_name: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_process_list_by_name",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_process_name = process_name.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::get_process_list_by_name(&api_process_name)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_process_pid_by_name_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
process_name: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_process_pid_by_name",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_process_name = process_name.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::get_process_pid_by_name(&api_process_name)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__asar_api__get_rsi_launcher_asar_data_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
asar_path: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_rsi_launcher_asar_data",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_asar_path = asar_path.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::asar_api::get_rsi_launcher_asar_data(&api_asar_path)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_system_info_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_system_info",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::get_system_info()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__get_system_memory_size_gb_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "get_system_memory_size_gb",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::get_system_memory_size_gb()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__kill_process_by_name_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
process_name: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "kill_process_by_name",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_process_name = process_name.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::kill_process_by_name(&api_process_name)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__ort_api__load_translation_model_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
model_path: impl CstDecode<String>,
|
|
model_key: impl CstDecode<String>,
|
|
quantization_suffix: impl CstDecode<String>,
|
|
use_xnnpack: impl CstDecode<bool>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "load_translation_model",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_model_path = model_path.cst_decode();
|
|
let api_model_key = model_key.cst_decode();
|
|
let api_quantization_suffix = quantization_suffix.cst_decode();
|
|
let api_use_xnnpack = use_xnnpack.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::ort_api::load_translation_model(
|
|
api_model_path,
|
|
api_model_key,
|
|
api_quantization_suffix,
|
|
api_use_xnnpack,
|
|
)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__open_dir_with_explorer_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
path: impl CstDecode<String>,
|
|
is_file: impl CstDecode<bool>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "open_dir_with_explorer",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_path = path.cst_decode();
|
|
let api_is_file = is_file.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::open_dir_with_explorer(&api_path, api_is_file)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__unp4k_api__p4k_close_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "p4k_close",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::unp4k_api::p4k_close().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__unp4k_api__p4k_extract_to_disk_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
file_path: impl CstDecode<String>,
|
|
output_path: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "p4k_extract_to_disk",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_file_path = file_path.cst_decode();
|
|
let api_output_path = output_path.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::unp4k_api::p4k_extract_to_disk(
|
|
api_file_path,
|
|
api_output_path,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__unp4k_api__p4k_extract_to_memory_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
file_path: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "p4k_extract_to_memory",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_file_path = file_path.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok =
|
|
crate::api::unp4k_api::p4k_extract_to_memory(api_file_path).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__unp4k_api__p4k_get_all_files_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "p4k_get_all_files",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::unp4k_api::p4k_get_all_files().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__unp4k_api__p4k_get_file_count_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "p4k_get_file_count",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::unp4k_api::p4k_get_file_count().await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__unp4k_api__p4k_open_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
p4k_path: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "p4k_open",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_p4k_path = p4k_path.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::unp4k_api::p4k_open(api_p4k_path).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__remove_nvme_patch_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "remove_nvme_patch",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::remove_nvme_patch()?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__resolve_shortcut_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
lnk_path: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "resolve_shortcut",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_lnk_path = lnk_path.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::resolve_shortcut(api_lnk_path)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<crate::api::asar_api::RsiLauncherAsarData>,
|
|
content: impl CstDecode<Vec<u8>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "rsi_launcher_asar_data_write_main_js",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_content = content.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || async move {
|
|
let output_ok = crate::api::asar_api::RsiLauncherAsarData::write_main_js(
|
|
&api_that,
|
|
api_content,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__run_as_admin_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
program: impl CstDecode<String>,
|
|
args: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "run_as_admin",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_program = program.cst_decode();
|
|
let api_args = args.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::run_as_admin(&api_program, &api_args)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__send_notify_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
summary: impl CstDecode<Option<String>>,
|
|
body: impl CstDecode<Option<String>>,
|
|
app_name: impl CstDecode<Option<String>>,
|
|
app_id: impl CstDecode<Option<String>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "send_notify",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_summary = summary.cst_decode();
|
|
let api_body = body.cst_decode();
|
|
let api_app_name = app_name.cst_decode();
|
|
let api_app_id = app_id.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::api::win32_api::send_notify(
|
|
api_summary,
|
|
api_body,
|
|
api_app_name,
|
|
api_app_id,
|
|
)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__http_api__set_default_header_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
headers: impl CstDecode<std::collections::HashMap<String, String>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "set_default_header",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_headers = headers.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok({
|
|
crate::api::http_api::set_default_header(api_headers);
|
|
})?;
|
|
Ok(output_ok)
|
|
})())
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__set_foreground_window_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
window_name: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "set_foreground_window",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_window_name = window_name.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::set_foreground_window(&api_window_name)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__rs_process__start_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
executable: impl CstDecode<String>,
|
|
arguments: impl CstDecode<Vec<String>>,
|
|
working_directory: impl CstDecode<String>,
|
|
stream_sink: impl CstDecode<
|
|
StreamSink<
|
|
crate::api::rs_process::RsProcessStreamData,
|
|
flutter_rust_bridge::for_generated::DcoCodec,
|
|
>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "start",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_executable = executable.cst_decode();
|
|
let api_arguments = arguments.cst_decode();
|
|
let api_working_directory = working_directory.cst_decode();
|
|
let api_stream_sink = stream_sink.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, ()>(
|
|
(move || async move {
|
|
let output_ok = Result::<_, ()>::Ok({
|
|
crate::api::rs_process::start(
|
|
&api_executable,
|
|
api_arguments,
|
|
&api_working_directory,
|
|
api_stream_sink,
|
|
)
|
|
.await;
|
|
})?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__win32_api__start_process_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
program: impl CstDecode<String>,
|
|
args: impl CstDecode<Vec<String>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "start_process",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_program = program.cst_decode();
|
|
let api_args = args.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::win32_api::start_process(&api_program, api_args)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__ort_api__translate_text_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
model_key: impl CstDecode<String>,
|
|
text: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "translate_text",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_model_key = model_key.cst_decode();
|
|
let api_text = text.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::ort_api::translate_text(api_model_key, api_text)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__ort_api__translate_text_batch_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
model_key: impl CstDecode<String>,
|
|
texts: impl CstDecode<Vec<String>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "translate_text_batch",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_model_key = model_key.cst_decode();
|
|
let api_texts = texts.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::ort_api::translate_text_batch(api_model_key, api_texts)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__ort_api__unload_translation_model_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
model_key: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "unload_translation_model",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_model_key = model_key.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok =
|
|
crate::api::ort_api::unload_translation_model(api_model_key)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__web_view_configuration_default_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "web_view_configuration_default",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::webview_api::WebViewConfiguration::default(),
|
|
)?;
|
|
Ok(output_ok)
|
|
})())
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__web_view_navigation_state_default_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "web_view_navigation_state_default",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
move |context| {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(
|
|
crate::api::webview_api::WebViewNavigationState::default(),
|
|
)?;
|
|
Ok(output_ok)
|
|
})())
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_close_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_close",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_close(api_id)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_create_impl(
|
|
config: impl CstDecode<crate::api::webview_api::WebViewConfiguration>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_create",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_config = config.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_create(api_config)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_execute_script_impl(
|
|
id: impl CstDecode<String>,
|
|
script: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_execute_script",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
let api_script = script.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok =
|
|
crate::api::webview_api::webview_execute_script(api_id, api_script)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_get_state_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_get_state",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_get_state(api_id)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_go_back_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_go_back",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_go_back(api_id)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_go_forward_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_go_forward",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_go_forward(api_id)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_is_closed_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_is_closed",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok =
|
|
Result::<_, ()>::Ok(crate::api::webview_api::webview_is_closed(api_id))?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_list_all_impl(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_list_all",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(crate::api::webview_api::webview_list_all())?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_navigate_impl(
|
|
id: impl CstDecode<String>,
|
|
url: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_navigate",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
let api_url = url.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_navigate(api_id, api_url)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_poll_events_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_poll_events",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok =
|
|
Result::<_, ()>::Ok(crate::api::webview_api::webview_poll_events(api_id))?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_reload_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_reload",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_reload(api_id)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_set_visibility_impl(
|
|
id: impl CstDecode<String>,
|
|
visible: impl CstDecode<bool>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_set_visibility",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
let api_visible = visible.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok =
|
|
crate::api::webview_api::webview_set_visibility(api_id, api_visible)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_set_window_position_impl(
|
|
id: impl CstDecode<String>,
|
|
x: impl CstDecode<i32>,
|
|
y: impl CstDecode<i32>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_set_window_position",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
let api_x = x.cst_decode();
|
|
let api_y = y.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok =
|
|
crate::api::webview_api::webview_set_window_position(api_id, api_x, api_y)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_set_window_size_impl(
|
|
id: impl CstDecode<String>,
|
|
width: impl CstDecode<u32>,
|
|
height: impl CstDecode<u32>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_set_window_size",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
let api_width = width.cst_decode();
|
|
let api_height = height.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_set_window_size(
|
|
api_id, api_width, api_height,
|
|
)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__webview_api__webview_stop_impl(
|
|
id: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "webview_stop",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_id = id.cst_decode();
|
|
transform_result_dco::<_, _, String>((move || {
|
|
let output_ok = crate::api::webview_api::webview_stop(api_id)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__api__rs_process__write_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
rs_pid: impl CstDecode<u32>,
|
|
data: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "write",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_rs_pid = rs_pid.cst_decode();
|
|
let api_data = data.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, ()>(
|
|
(move || async move {
|
|
let output_ok = Result::<_, ()>::Ok({
|
|
crate::api::rs_process::write(&api_rs_pid, api_data).await;
|
|
})?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
|
|
// Section: dart2rust
|
|
|
|
impl CstDecode<bool> for bool {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> bool {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::downloader_api::DownloadTaskStatus> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::downloader_api::DownloadTaskStatus {
|
|
match self {
|
|
0 => crate::api::downloader_api::DownloadTaskStatus::Checking,
|
|
1 => crate::api::downloader_api::DownloadTaskStatus::Live,
|
|
2 => crate::api::downloader_api::DownloadTaskStatus::Paused,
|
|
3 => crate::api::downloader_api::DownloadTaskStatus::Error,
|
|
4 => crate::api::downloader_api::DownloadTaskStatus::Finished,
|
|
_ => unreachable!("Invalid variant for DownloadTaskStatus: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<f64> for f64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> f64 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<i32> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> i32 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<i64> for i64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> i64 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<crate::http_package::MyHttpVersion> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::http_package::MyHttpVersion {
|
|
match self {
|
|
0 => crate::http_package::MyHttpVersion::HTTP_09,
|
|
1 => crate::http_package::MyHttpVersion::HTTP_10,
|
|
2 => crate::http_package::MyHttpVersion::HTTP_11,
|
|
3 => crate::http_package::MyHttpVersion::HTTP_2,
|
|
4 => crate::http_package::MyHttpVersion::HTTP_3,
|
|
5 => crate::http_package::MyHttpVersion::HTTP_UNKNOWN,
|
|
_ => unreachable!("Invalid variant for MyHttpVersion: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::http_api::MyMethod> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::http_api::MyMethod {
|
|
match self {
|
|
0 => crate::api::http_api::MyMethod::Options,
|
|
1 => crate::api::http_api::MyMethod::Gets,
|
|
2 => crate::api::http_api::MyMethod::Post,
|
|
3 => crate::api::http_api::MyMethod::Put,
|
|
4 => crate::api::http_api::MyMethod::Delete,
|
|
5 => crate::api::http_api::MyMethod::Head,
|
|
6 => crate::api::http_api::MyMethod::Trace,
|
|
7 => crate::api::http_api::MyMethod::Connect,
|
|
8 => crate::api::http_api::MyMethod::Patch,
|
|
_ => unreachable!("Invalid variant for MyMethod: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::rs_process::RsProcessStreamDataType> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::rs_process::RsProcessStreamDataType {
|
|
match self {
|
|
0 => crate::api::rs_process::RsProcessStreamDataType::Output,
|
|
1 => crate::api::rs_process::RsProcessStreamDataType::Error,
|
|
2 => crate::api::rs_process::RsProcessStreamDataType::Exit,
|
|
_ => unreachable!("Invalid variant for RsProcessStreamDataType: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<u16> for u16 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u16 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<u32> for u32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u32 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<u64> for u64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u64 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<u8> for u8 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u8 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<usize> for usize {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> usize {
|
|
self
|
|
}
|
|
}
|
|
impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <String>::sse_decode(deserializer);
|
|
return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner);
|
|
}
|
|
}
|
|
|
|
impl SseDecode for std::collections::HashMap<String, String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <Vec<(String, String)>>::sse_decode(deserializer);
|
|
return inner.into_iter().collect();
|
|
}
|
|
}
|
|
|
|
impl SseDecode
|
|
for StreamSink<
|
|
crate::api::rs_process::RsProcessStreamData,
|
|
flutter_rust_bridge::for_generated::DcoCodec,
|
|
>
|
|
{
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <String>::sse_decode(deserializer);
|
|
return StreamSink::deserialize(inner);
|
|
}
|
|
}
|
|
|
|
impl SseDecode for String {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <Vec<u8>>::sse_decode(deserializer);
|
|
return String::from_utf8(inner).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseDecode for bool {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u8().unwrap() != 0
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::downloader_api::DownloadGlobalStat {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_downloadSpeed = <u64>::sse_decode(deserializer);
|
|
let mut var_uploadSpeed = <u64>::sse_decode(deserializer);
|
|
let mut var_numActive = <usize>::sse_decode(deserializer);
|
|
let mut var_numWaiting = <usize>::sse_decode(deserializer);
|
|
return crate::api::downloader_api::DownloadGlobalStat {
|
|
download_speed: var_downloadSpeed,
|
|
upload_speed: var_uploadSpeed,
|
|
num_active: var_numActive,
|
|
num_waiting: var_numWaiting,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::downloader_api::DownloadTaskInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_id = <usize>::sse_decode(deserializer);
|
|
let mut var_name = <String>::sse_decode(deserializer);
|
|
let mut var_status =
|
|
<crate::api::downloader_api::DownloadTaskStatus>::sse_decode(deserializer);
|
|
let mut var_totalBytes = <u64>::sse_decode(deserializer);
|
|
let mut var_downloadedBytes = <u64>::sse_decode(deserializer);
|
|
let mut var_uploadedBytes = <u64>::sse_decode(deserializer);
|
|
let mut var_downloadSpeed = <u64>::sse_decode(deserializer);
|
|
let mut var_uploadSpeed = <u64>::sse_decode(deserializer);
|
|
let mut var_progress = <f64>::sse_decode(deserializer);
|
|
let mut var_numPeers = <usize>::sse_decode(deserializer);
|
|
let mut var_outputFolder = <String>::sse_decode(deserializer);
|
|
return crate::api::downloader_api::DownloadTaskInfo {
|
|
id: var_id,
|
|
name: var_name,
|
|
status: var_status,
|
|
total_bytes: var_totalBytes,
|
|
downloaded_bytes: var_downloadedBytes,
|
|
uploaded_bytes: var_uploadedBytes,
|
|
download_speed: var_downloadSpeed,
|
|
upload_speed: var_uploadSpeed,
|
|
progress: var_progress,
|
|
num_peers: var_numPeers,
|
|
output_folder: var_outputFolder,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::downloader_api::DownloadTaskStatus {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::api::downloader_api::DownloadTaskStatus::Checking,
|
|
1 => crate::api::downloader_api::DownloadTaskStatus::Live,
|
|
2 => crate::api::downloader_api::DownloadTaskStatus::Paused,
|
|
3 => crate::api::downloader_api::DownloadTaskStatus::Error,
|
|
4 => crate::api::downloader_api::DownloadTaskStatus::Finished,
|
|
_ => unreachable!("Invalid variant for DownloadTaskStatus: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for f64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_f64::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for i32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_i32::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for i64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_i64::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<String>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::api::downloader_api::DownloadTaskInfo> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::api::downloader_api::DownloadTaskInfo>::sse_decode(
|
|
deserializer,
|
|
));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::api::unp4k_api::P4kFileItem> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::api::unp4k_api::P4kFileItem>::sse_decode(
|
|
deserializer,
|
|
));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<u8> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<u8>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::api::win32_api::ProcessInfo> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::api::win32_api::ProcessInfo>::sse_decode(
|
|
deserializer,
|
|
));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<(String, String)> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<(String, String)>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::api::webview_api::WebViewEvent> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::api::webview_api::WebViewEvent>::sse_decode(
|
|
deserializer,
|
|
));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::http_package::MyHttpVersion {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::http_package::MyHttpVersion::HTTP_09,
|
|
1 => crate::http_package::MyHttpVersion::HTTP_10,
|
|
2 => crate::http_package::MyHttpVersion::HTTP_11,
|
|
3 => crate::http_package::MyHttpVersion::HTTP_2,
|
|
4 => crate::http_package::MyHttpVersion::HTTP_3,
|
|
5 => crate::http_package::MyHttpVersion::HTTP_UNKNOWN,
|
|
_ => unreachable!("Invalid variant for MyHttpVersion: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::http_api::MyMethod {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::api::http_api::MyMethod::Options,
|
|
1 => crate::api::http_api::MyMethod::Gets,
|
|
2 => crate::api::http_api::MyMethod::Post,
|
|
3 => crate::api::http_api::MyMethod::Put,
|
|
4 => crate::api::http_api::MyMethod::Delete,
|
|
5 => crate::api::http_api::MyMethod::Head,
|
|
6 => crate::api::http_api::MyMethod::Trace,
|
|
7 => crate::api::http_api::MyMethod::Connect,
|
|
8 => crate::api::http_api::MyMethod::Patch,
|
|
_ => unreachable!("Invalid variant for MyMethod: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<std::collections::HashMap<String, String>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<std::collections::HashMap<String, String>>::sse_decode(
|
|
deserializer,
|
|
));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<String>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<bool> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<bool>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<u32> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<u32>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<u64> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<u64>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<Vec<String>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<Vec<String>>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<Vec<u8>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<Vec<u8>>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::unp4k_api::P4kFileItem {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_name = <String>::sse_decode(deserializer);
|
|
let mut var_isDirectory = <bool>::sse_decode(deserializer);
|
|
let mut var_size = <u64>::sse_decode(deserializer);
|
|
let mut var_compressedSize = <u64>::sse_decode(deserializer);
|
|
let mut var_dateModified = <i64>::sse_decode(deserializer);
|
|
return crate::api::unp4k_api::P4kFileItem {
|
|
name: var_name,
|
|
is_directory: var_isDirectory,
|
|
size: var_size,
|
|
compressed_size: var_compressedSize,
|
|
date_modified: var_dateModified,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::win32_api::ProcessInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_pid = <u32>::sse_decode(deserializer);
|
|
let mut var_name = <String>::sse_decode(deserializer);
|
|
let mut var_path = <String>::sse_decode(deserializer);
|
|
return crate::api::win32_api::ProcessInfo {
|
|
pid: var_pid,
|
|
name: var_name,
|
|
path: var_path,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for (String, String) {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_field0 = <String>::sse_decode(deserializer);
|
|
let mut var_field1 = <String>::sse_decode(deserializer);
|
|
return (var_field0, var_field1);
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::rs_process::RsProcessStreamData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_dataType =
|
|
<crate::api::rs_process::RsProcessStreamDataType>::sse_decode(deserializer);
|
|
let mut var_data = <String>::sse_decode(deserializer);
|
|
let mut var_rsPid = <u32>::sse_decode(deserializer);
|
|
return crate::api::rs_process::RsProcessStreamData {
|
|
data_type: var_dataType,
|
|
data: var_data,
|
|
rs_pid: var_rsPid,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::rs_process::RsProcessStreamDataType {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::api::rs_process::RsProcessStreamDataType::Output,
|
|
1 => crate::api::rs_process::RsProcessStreamDataType::Error,
|
|
2 => crate::api::rs_process::RsProcessStreamDataType::Exit,
|
|
_ => unreachable!("Invalid variant for RsProcessStreamDataType: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::asar_api::RsiLauncherAsarData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_asarPath = <String>::sse_decode(deserializer);
|
|
let mut var_mainJsPath = <String>::sse_decode(deserializer);
|
|
let mut var_mainJsContent = <Vec<u8>>::sse_decode(deserializer);
|
|
return crate::api::asar_api::RsiLauncherAsarData {
|
|
asar_path: var_asarPath,
|
|
main_js_path: var_mainJsPath,
|
|
main_js_content: var_mainJsContent,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::http_package::RustHttpResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_statusCode = <u16>::sse_decode(deserializer);
|
|
let mut var_headers = <std::collections::HashMap<String, String>>::sse_decode(deserializer);
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
let mut var_contentLength = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_version = <crate::http_package::MyHttpVersion>::sse_decode(deserializer);
|
|
let mut var_remoteAddr = <String>::sse_decode(deserializer);
|
|
let mut var_data = <Option<Vec<u8>>>::sse_decode(deserializer);
|
|
return crate::http_package::RustHttpResponse {
|
|
status_code: var_statusCode,
|
|
headers: var_headers,
|
|
url: var_url,
|
|
content_length: var_contentLength,
|
|
version: var_version,
|
|
remote_addr: var_remoteAddr,
|
|
data: var_data,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::win32_api::SystemInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_osName = <String>::sse_decode(deserializer);
|
|
let mut var_cpuName = <String>::sse_decode(deserializer);
|
|
let mut var_gpuInfo = <String>::sse_decode(deserializer);
|
|
let mut var_diskInfo = <String>::sse_decode(deserializer);
|
|
return crate::api::win32_api::SystemInfo {
|
|
os_name: var_osName,
|
|
cpu_name: var_cpuName,
|
|
gpu_info: var_gpuInfo,
|
|
disk_info: var_diskInfo,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u16 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u16::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u32::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u64::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u8 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u8().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for () {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {}
|
|
}
|
|
|
|
impl SseDecode for usize {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u64::<NativeEndian>().unwrap() as _
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::webview_api::WebViewConfiguration {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_title = <String>::sse_decode(deserializer);
|
|
let mut var_width = <u32>::sse_decode(deserializer);
|
|
let mut var_height = <u32>::sse_decode(deserializer);
|
|
let mut var_userDataFolder = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_enableDevtools = <bool>::sse_decode(deserializer);
|
|
let mut var_transparent = <bool>::sse_decode(deserializer);
|
|
let mut var_userAgent = <Option<String>>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewConfiguration {
|
|
title: var_title,
|
|
width: var_width,
|
|
height: var_height,
|
|
user_data_folder: var_userDataFolder,
|
|
enable_devtools: var_enableDevtools,
|
|
transparent: var_transparent,
|
|
user_agent: var_userAgent,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::webview_api::WebViewEvent {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewEvent::NavigationStarted { url: var_url };
|
|
}
|
|
1 => {
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewEvent::NavigationCompleted { url: var_url };
|
|
}
|
|
2 => {
|
|
let mut var_title = <String>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewEvent::TitleChanged { title: var_title };
|
|
}
|
|
3 => {
|
|
let mut var_message = <String>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewEvent::WebMessage {
|
|
message: var_message,
|
|
};
|
|
}
|
|
4 => {
|
|
return crate::api::webview_api::WebViewEvent::WindowClosed;
|
|
}
|
|
5 => {
|
|
let mut var_message = <String>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewEvent::Error {
|
|
message: var_message,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::api::webview_api::WebViewNavigationState {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
let mut var_title = <String>::sse_decode(deserializer);
|
|
let mut var_canGoBack = <bool>::sse_decode(deserializer);
|
|
let mut var_canGoForward = <bool>::sse_decode(deserializer);
|
|
let mut var_isLoading = <bool>::sse_decode(deserializer);
|
|
return crate::api::webview_api::WebViewNavigationState {
|
|
url: var_url,
|
|
title: var_title,
|
|
can_go_back: var_canGoBack,
|
|
can_go_forward: var_canGoForward,
|
|
is_loading: var_isLoading,
|
|
};
|
|
}
|
|
}
|
|
|
|
fn pde_ffi_dispatcher_primary_impl(
|
|
func_id: i32,
|
|
port: flutter_rust_bridge::for_generated::MessagePort,
|
|
ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
|
rust_vec_len: i32,
|
|
data_len: i32,
|
|
) {
|
|
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
|
|
match func_id {
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
|
|
fn pde_ffi_dispatcher_sync_impl(
|
|
func_id: i32,
|
|
ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
|
rust_vec_len: i32,
|
|
data_len: i32,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
|
|
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
|
|
match func_id {
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
|
|
// Section: rust2dart
|
|
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::downloader_api::DownloadGlobalStat {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.download_speed.into_into_dart().into_dart(),
|
|
self.upload_speed.into_into_dart().into_dart(),
|
|
self.num_active.into_into_dart().into_dart(),
|
|
self.num_waiting.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::downloader_api::DownloadGlobalStat
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::downloader_api::DownloadGlobalStat>
|
|
for crate::api::downloader_api::DownloadGlobalStat
|
|
{
|
|
fn into_into_dart(self) -> crate::api::downloader_api::DownloadGlobalStat {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::downloader_api::DownloadTaskInfo {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.id.into_into_dart().into_dart(),
|
|
self.name.into_into_dart().into_dart(),
|
|
self.status.into_into_dart().into_dart(),
|
|
self.total_bytes.into_into_dart().into_dart(),
|
|
self.downloaded_bytes.into_into_dart().into_dart(),
|
|
self.uploaded_bytes.into_into_dart().into_dart(),
|
|
self.download_speed.into_into_dart().into_dart(),
|
|
self.upload_speed.into_into_dart().into_dart(),
|
|
self.progress.into_into_dart().into_dart(),
|
|
self.num_peers.into_into_dart().into_dart(),
|
|
self.output_folder.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::downloader_api::DownloadTaskInfo
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::downloader_api::DownloadTaskInfo>
|
|
for crate::api::downloader_api::DownloadTaskInfo
|
|
{
|
|
fn into_into_dart(self) -> crate::api::downloader_api::DownloadTaskInfo {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::downloader_api::DownloadTaskStatus {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Checking => 0.into_dart(),
|
|
Self::Live => 1.into_dart(),
|
|
Self::Paused => 2.into_dart(),
|
|
Self::Error => 3.into_dart(),
|
|
Self::Finished => 4.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::downloader_api::DownloadTaskStatus
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::downloader_api::DownloadTaskStatus>
|
|
for crate::api::downloader_api::DownloadTaskStatus
|
|
{
|
|
fn into_into_dart(self) -> crate::api::downloader_api::DownloadTaskStatus {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::http_package::MyHttpVersion {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::HTTP_09 => 0.into_dart(),
|
|
Self::HTTP_10 => 1.into_dart(),
|
|
Self::HTTP_11 => 2.into_dart(),
|
|
Self::HTTP_2 => 3.into_dart(),
|
|
Self::HTTP_3 => 4.into_dart(),
|
|
Self::HTTP_UNKNOWN => 5.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::http_package::MyHttpVersion
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::http_package::MyHttpVersion>
|
|
for crate::http_package::MyHttpVersion
|
|
{
|
|
fn into_into_dart(self) -> crate::http_package::MyHttpVersion {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::http_api::MyMethod {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Options => 0.into_dart(),
|
|
Self::Gets => 1.into_dart(),
|
|
Self::Post => 2.into_dart(),
|
|
Self::Put => 3.into_dart(),
|
|
Self::Delete => 4.into_dart(),
|
|
Self::Head => 5.into_dart(),
|
|
Self::Trace => 6.into_dart(),
|
|
Self::Connect => 7.into_dart(),
|
|
Self::Patch => 8.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::http_api::MyMethod
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::http_api::MyMethod>
|
|
for crate::api::http_api::MyMethod
|
|
{
|
|
fn into_into_dart(self) -> crate::api::http_api::MyMethod {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::unp4k_api::P4kFileItem {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.name.into_into_dart().into_dart(),
|
|
self.is_directory.into_into_dart().into_dart(),
|
|
self.size.into_into_dart().into_dart(),
|
|
self.compressed_size.into_into_dart().into_dart(),
|
|
self.date_modified.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::unp4k_api::P4kFileItem
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::unp4k_api::P4kFileItem>
|
|
for crate::api::unp4k_api::P4kFileItem
|
|
{
|
|
fn into_into_dart(self) -> crate::api::unp4k_api::P4kFileItem {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::win32_api::ProcessInfo {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.pid.into_into_dart().into_dart(),
|
|
self.name.into_into_dart().into_dart(),
|
|
self.path.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::win32_api::ProcessInfo
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::win32_api::ProcessInfo>
|
|
for crate::api::win32_api::ProcessInfo
|
|
{
|
|
fn into_into_dart(self) -> crate::api::win32_api::ProcessInfo {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::rs_process::RsProcessStreamData {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.data_type.into_into_dart().into_dart(),
|
|
self.data.into_into_dart().into_dart(),
|
|
self.rs_pid.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::rs_process::RsProcessStreamData
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::rs_process::RsProcessStreamData>
|
|
for crate::api::rs_process::RsProcessStreamData
|
|
{
|
|
fn into_into_dart(self) -> crate::api::rs_process::RsProcessStreamData {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::rs_process::RsProcessStreamDataType {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Output => 0.into_dart(),
|
|
Self::Error => 1.into_dart(),
|
|
Self::Exit => 2.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::rs_process::RsProcessStreamDataType
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::rs_process::RsProcessStreamDataType>
|
|
for crate::api::rs_process::RsProcessStreamDataType
|
|
{
|
|
fn into_into_dart(self) -> crate::api::rs_process::RsProcessStreamDataType {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::asar_api::RsiLauncherAsarData {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.asar_path.into_into_dart().into_dart(),
|
|
self.main_js_path.into_into_dart().into_dart(),
|
|
self.main_js_content.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::asar_api::RsiLauncherAsarData
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::asar_api::RsiLauncherAsarData>
|
|
for crate::api::asar_api::RsiLauncherAsarData
|
|
{
|
|
fn into_into_dart(self) -> crate::api::asar_api::RsiLauncherAsarData {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::http_package::RustHttpResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.status_code.into_into_dart().into_dart(),
|
|
self.headers.into_into_dart().into_dart(),
|
|
self.url.into_into_dart().into_dart(),
|
|
self.content_length.into_into_dart().into_dart(),
|
|
self.version.into_into_dart().into_dart(),
|
|
self.remote_addr.into_into_dart().into_dart(),
|
|
self.data.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::http_package::RustHttpResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::http_package::RustHttpResponse>
|
|
for crate::http_package::RustHttpResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::http_package::RustHttpResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::win32_api::SystemInfo {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.os_name.into_into_dart().into_dart(),
|
|
self.cpu_name.into_into_dart().into_dart(),
|
|
self.gpu_info.into_into_dart().into_dart(),
|
|
self.disk_info.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::win32_api::SystemInfo
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::win32_api::SystemInfo>
|
|
for crate::api::win32_api::SystemInfo
|
|
{
|
|
fn into_into_dart(self) -> crate::api::win32_api::SystemInfo {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::webview_api::WebViewConfiguration {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.title.into_into_dart().into_dart(),
|
|
self.width.into_into_dart().into_dart(),
|
|
self.height.into_into_dart().into_dart(),
|
|
self.user_data_folder.into_into_dart().into_dart(),
|
|
self.enable_devtools.into_into_dart().into_dart(),
|
|
self.transparent.into_into_dart().into_dart(),
|
|
self.user_agent.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::webview_api::WebViewConfiguration
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::webview_api::WebViewConfiguration>
|
|
for crate::api::webview_api::WebViewConfiguration
|
|
{
|
|
fn into_into_dart(self) -> crate::api::webview_api::WebViewConfiguration {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::webview_api::WebViewEvent {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::api::webview_api::WebViewEvent::NavigationStarted { url } => {
|
|
[0.into_dart(), url.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::api::webview_api::WebViewEvent::NavigationCompleted { url } => {
|
|
[1.into_dart(), url.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::api::webview_api::WebViewEvent::TitleChanged { title } => {
|
|
[2.into_dart(), title.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::api::webview_api::WebViewEvent::WebMessage { message } => {
|
|
[3.into_dart(), message.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::api::webview_api::WebViewEvent::WindowClosed => [4.into_dart()].into_dart(),
|
|
crate::api::webview_api::WebViewEvent::Error { message } => {
|
|
[5.into_dart(), message.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::webview_api::WebViewEvent
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::webview_api::WebViewEvent>
|
|
for crate::api::webview_api::WebViewEvent
|
|
{
|
|
fn into_into_dart(self) -> crate::api::webview_api::WebViewEvent {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::api::webview_api::WebViewNavigationState {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.url.into_into_dart().into_dart(),
|
|
self.title.into_into_dart().into_dart(),
|
|
self.can_go_back.into_into_dart().into_dart(),
|
|
self.can_go_forward.into_into_dart().into_dart(),
|
|
self.is_loading.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::api::webview_api::WebViewNavigationState
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::api::webview_api::WebViewNavigationState>
|
|
for crate::api::webview_api::WebViewNavigationState
|
|
{
|
|
fn into_into_dart(self) -> crate::api::webview_api::WebViewNavigationState {
|
|
self
|
|
}
|
|
}
|
|
|
|
impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(format!("{:?}", self), serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for std::collections::HashMap<String, String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Vec<(String, String)>>::sse_encode(self.into_iter().collect(), serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode
|
|
for StreamSink<
|
|
crate::api::rs_process::RsProcessStreamData,
|
|
flutter_rust_bridge::for_generated::DcoCodec,
|
|
>
|
|
{
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
unimplemented!("")
|
|
}
|
|
}
|
|
|
|
impl SseEncode for String {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Vec<u8>>::sse_encode(self.into_bytes(), serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for bool {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u8(self as _).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::downloader_api::DownloadGlobalStat {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u64>::sse_encode(self.download_speed, serializer);
|
|
<u64>::sse_encode(self.upload_speed, serializer);
|
|
<usize>::sse_encode(self.num_active, serializer);
|
|
<usize>::sse_encode(self.num_waiting, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::downloader_api::DownloadTaskInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<usize>::sse_encode(self.id, serializer);
|
|
<String>::sse_encode(self.name, serializer);
|
|
<crate::api::downloader_api::DownloadTaskStatus>::sse_encode(self.status, serializer);
|
|
<u64>::sse_encode(self.total_bytes, serializer);
|
|
<u64>::sse_encode(self.downloaded_bytes, serializer);
|
|
<u64>::sse_encode(self.uploaded_bytes, serializer);
|
|
<u64>::sse_encode(self.download_speed, serializer);
|
|
<u64>::sse_encode(self.upload_speed, serializer);
|
|
<f64>::sse_encode(self.progress, serializer);
|
|
<usize>::sse_encode(self.num_peers, serializer);
|
|
<String>::sse_encode(self.output_folder, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::downloader_api::DownloadTaskStatus {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::api::downloader_api::DownloadTaskStatus::Checking => 0,
|
|
crate::api::downloader_api::DownloadTaskStatus::Live => 1,
|
|
crate::api::downloader_api::DownloadTaskStatus::Paused => 2,
|
|
crate::api::downloader_api::DownloadTaskStatus::Error => 3,
|
|
crate::api::downloader_api::DownloadTaskStatus::Finished => 4,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for f64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_f64::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for i32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_i32::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for i64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_i64::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<String>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::api::downloader_api::DownloadTaskInfo> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::api::downloader_api::DownloadTaskInfo>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::api::unp4k_api::P4kFileItem> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::api::unp4k_api::P4kFileItem>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<u8> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<u8>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::api::win32_api::ProcessInfo> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::api::win32_api::ProcessInfo>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<(String, String)> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<(String, String)>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::api::webview_api::WebViewEvent> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::api::webview_api::WebViewEvent>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::http_package::MyHttpVersion {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::http_package::MyHttpVersion::HTTP_09 => 0,
|
|
crate::http_package::MyHttpVersion::HTTP_10 => 1,
|
|
crate::http_package::MyHttpVersion::HTTP_11 => 2,
|
|
crate::http_package::MyHttpVersion::HTTP_2 => 3,
|
|
crate::http_package::MyHttpVersion::HTTP_3 => 4,
|
|
crate::http_package::MyHttpVersion::HTTP_UNKNOWN => 5,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::http_api::MyMethod {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::api::http_api::MyMethod::Options => 0,
|
|
crate::api::http_api::MyMethod::Gets => 1,
|
|
crate::api::http_api::MyMethod::Post => 2,
|
|
crate::api::http_api::MyMethod::Put => 3,
|
|
crate::api::http_api::MyMethod::Delete => 4,
|
|
crate::api::http_api::MyMethod::Head => 5,
|
|
crate::api::http_api::MyMethod::Trace => 6,
|
|
crate::api::http_api::MyMethod::Connect => 7,
|
|
crate::api::http_api::MyMethod::Patch => 8,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<std::collections::HashMap<String, String>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<std::collections::HashMap<String, String>>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<String>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<bool> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<bool>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<u32> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<u32>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<u64> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<u64>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<Vec<String>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<Vec<String>>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<Vec<u8>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<Vec<u8>>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::unp4k_api::P4kFileItem {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.name, serializer);
|
|
<bool>::sse_encode(self.is_directory, serializer);
|
|
<u64>::sse_encode(self.size, serializer);
|
|
<u64>::sse_encode(self.compressed_size, serializer);
|
|
<i64>::sse_encode(self.date_modified, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::win32_api::ProcessInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u32>::sse_encode(self.pid, serializer);
|
|
<String>::sse_encode(self.name, serializer);
|
|
<String>::sse_encode(self.path, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for (String, String) {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.0, serializer);
|
|
<String>::sse_encode(self.1, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::rs_process::RsProcessStreamData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::api::rs_process::RsProcessStreamDataType>::sse_encode(self.data_type, serializer);
|
|
<String>::sse_encode(self.data, serializer);
|
|
<u32>::sse_encode(self.rs_pid, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::rs_process::RsProcessStreamDataType {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::api::rs_process::RsProcessStreamDataType::Output => 0,
|
|
crate::api::rs_process::RsProcessStreamDataType::Error => 1,
|
|
crate::api::rs_process::RsProcessStreamDataType::Exit => 2,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::asar_api::RsiLauncherAsarData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.asar_path, serializer);
|
|
<String>::sse_encode(self.main_js_path, serializer);
|
|
<Vec<u8>>::sse_encode(self.main_js_content, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::http_package::RustHttpResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u16>::sse_encode(self.status_code, serializer);
|
|
<std::collections::HashMap<String, String>>::sse_encode(self.headers, serializer);
|
|
<String>::sse_encode(self.url, serializer);
|
|
<Option<u64>>::sse_encode(self.content_length, serializer);
|
|
<crate::http_package::MyHttpVersion>::sse_encode(self.version, serializer);
|
|
<String>::sse_encode(self.remote_addr, serializer);
|
|
<Option<Vec<u8>>>::sse_encode(self.data, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::win32_api::SystemInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.os_name, serializer);
|
|
<String>::sse_encode(self.cpu_name, serializer);
|
|
<String>::sse_encode(self.gpu_info, serializer);
|
|
<String>::sse_encode(self.disk_info, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u16 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u16::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u32::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u64::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u8 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u8(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for () {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {}
|
|
}
|
|
|
|
impl SseEncode for usize {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer
|
|
.cursor
|
|
.write_u64::<NativeEndian>(self as _)
|
|
.unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::webview_api::WebViewConfiguration {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.title, serializer);
|
|
<u32>::sse_encode(self.width, serializer);
|
|
<u32>::sse_encode(self.height, serializer);
|
|
<Option<String>>::sse_encode(self.user_data_folder, serializer);
|
|
<bool>::sse_encode(self.enable_devtools, serializer);
|
|
<bool>::sse_encode(self.transparent, serializer);
|
|
<Option<String>>::sse_encode(self.user_agent, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::webview_api::WebViewEvent {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::api::webview_api::WebViewEvent::NavigationStarted { url } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<String>::sse_encode(url, serializer);
|
|
}
|
|
crate::api::webview_api::WebViewEvent::NavigationCompleted { url } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(url, serializer);
|
|
}
|
|
crate::api::webview_api::WebViewEvent::TitleChanged { title } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<String>::sse_encode(title, serializer);
|
|
}
|
|
crate::api::webview_api::WebViewEvent::WebMessage { message } => {
|
|
<i32>::sse_encode(3, serializer);
|
|
<String>::sse_encode(message, serializer);
|
|
}
|
|
crate::api::webview_api::WebViewEvent::WindowClosed => {
|
|
<i32>::sse_encode(4, serializer);
|
|
}
|
|
crate::api::webview_api::WebViewEvent::Error { message } => {
|
|
<i32>::sse_encode(5, serializer);
|
|
<String>::sse_encode(message, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::api::webview_api::WebViewNavigationState {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.url, serializer);
|
|
<String>::sse_encode(self.title, serializer);
|
|
<bool>::sse_encode(self.can_go_back, serializer);
|
|
<bool>::sse_encode(self.can_go_forward, serializer);
|
|
<bool>::sse_encode(self.is_loading, serializer);
|
|
}
|
|
}
|
|
|
|
#[cfg(not(target_family = "wasm"))]
|
|
mod io {
|
|
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.11.1.
|
|
|
|
// Section: imports
|
|
|
|
use super::*;
|
|
use flutter_rust_bridge::for_generated::byteorder::{
|
|
NativeEndian, ReadBytesExt, WriteBytesExt,
|
|
};
|
|
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
|
|
use flutter_rust_bridge::{Handler, IntoIntoDart};
|
|
|
|
// Section: boilerplate
|
|
|
|
flutter_rust_bridge::frb_generated_boilerplate_io!();
|
|
|
|
// Section: dart2rust
|
|
|
|
impl CstDecode<flutter_rust_bridge::for_generated::anyhow::Error>
|
|
for *mut wire_cst_list_prim_u_8_strict
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error {
|
|
unimplemented!()
|
|
}
|
|
}
|
|
impl CstDecode<std::collections::HashMap<String, String>>
|
|
for *mut wire_cst_list_record_string_string
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> std::collections::HashMap<String, String> {
|
|
let vec: Vec<(String, String)> = self.cst_decode();
|
|
vec.into_iter().collect()
|
|
}
|
|
}
|
|
impl
|
|
CstDecode<
|
|
StreamSink<
|
|
crate::api::rs_process::RsProcessStreamData,
|
|
flutter_rust_bridge::for_generated::DcoCodec,
|
|
>,
|
|
> for *mut wire_cst_list_prim_u_8_strict
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(
|
|
self,
|
|
) -> StreamSink<
|
|
crate::api::rs_process::RsProcessStreamData,
|
|
flutter_rust_bridge::for_generated::DcoCodec,
|
|
> {
|
|
let raw: String = self.cst_decode();
|
|
StreamSink::deserialize(raw)
|
|
}
|
|
}
|
|
impl CstDecode<String> for *mut wire_cst_list_prim_u_8_strict {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> String {
|
|
let vec: Vec<u8> = self.cst_decode();
|
|
String::from_utf8(vec).unwrap()
|
|
}
|
|
}
|
|
impl CstDecode<bool> for *mut bool {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> bool {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::asar_api::RsiLauncherAsarData> for *mut wire_cst_rsi_launcher_asar_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::asar_api::RsiLauncherAsarData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::api::asar_api::RsiLauncherAsarData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<u32> for *mut u32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u32 {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<u64> for *mut u64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u64 {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::webview_api::WebViewConfiguration>
|
|
for *mut wire_cst_web_view_configuration
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::webview_api::WebViewConfiguration {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::api::webview_api::WebViewConfiguration>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::downloader_api::DownloadGlobalStat> for wire_cst_download_global_stat {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::downloader_api::DownloadGlobalStat {
|
|
crate::api::downloader_api::DownloadGlobalStat {
|
|
download_speed: self.download_speed.cst_decode(),
|
|
upload_speed: self.upload_speed.cst_decode(),
|
|
num_active: self.num_active.cst_decode(),
|
|
num_waiting: self.num_waiting.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::downloader_api::DownloadTaskInfo> for wire_cst_download_task_info {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::downloader_api::DownloadTaskInfo {
|
|
crate::api::downloader_api::DownloadTaskInfo {
|
|
id: self.id.cst_decode(),
|
|
name: self.name.cst_decode(),
|
|
status: self.status.cst_decode(),
|
|
total_bytes: self.total_bytes.cst_decode(),
|
|
downloaded_bytes: self.downloaded_bytes.cst_decode(),
|
|
uploaded_bytes: self.uploaded_bytes.cst_decode(),
|
|
download_speed: self.download_speed.cst_decode(),
|
|
upload_speed: self.upload_speed.cst_decode(),
|
|
progress: self.progress.cst_decode(),
|
|
num_peers: self.num_peers.cst_decode(),
|
|
output_folder: self.output_folder.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<Vec<String>> for *mut wire_cst_list_String {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<String> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::api::downloader_api::DownloadTaskInfo>>
|
|
for *mut wire_cst_list_download_task_info
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::api::downloader_api::DownloadTaskInfo> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::api::unp4k_api::P4kFileItem>> for *mut wire_cst_list_p_4_k_file_item {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::api::unp4k_api::P4kFileItem> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<u8>> for *mut wire_cst_list_prim_u_8_loose {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<u8> {
|
|
unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<Vec<u8>> for *mut wire_cst_list_prim_u_8_strict {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<u8> {
|
|
unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::api::win32_api::ProcessInfo>> for *mut wire_cst_list_process_info {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::api::win32_api::ProcessInfo> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<(String, String)>> for *mut wire_cst_list_record_string_string {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<(String, String)> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::api::webview_api::WebViewEvent>> for *mut wire_cst_list_web_view_event {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::api::webview_api::WebViewEvent> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::unp4k_api::P4kFileItem> for wire_cst_p_4_k_file_item {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::unp4k_api::P4kFileItem {
|
|
crate::api::unp4k_api::P4kFileItem {
|
|
name: self.name.cst_decode(),
|
|
is_directory: self.is_directory.cst_decode(),
|
|
size: self.size.cst_decode(),
|
|
compressed_size: self.compressed_size.cst_decode(),
|
|
date_modified: self.date_modified.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::win32_api::ProcessInfo> for wire_cst_process_info {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::win32_api::ProcessInfo {
|
|
crate::api::win32_api::ProcessInfo {
|
|
pid: self.pid.cst_decode(),
|
|
name: self.name.cst_decode(),
|
|
path: self.path.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<(String, String)> for wire_cst_record_string_string {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> (String, String) {
|
|
(self.field0.cst_decode(), self.field1.cst_decode())
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::rs_process::RsProcessStreamData> for wire_cst_rs_process_stream_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::rs_process::RsProcessStreamData {
|
|
crate::api::rs_process::RsProcessStreamData {
|
|
data_type: self.data_type.cst_decode(),
|
|
data: self.data.cst_decode(),
|
|
rs_pid: self.rs_pid.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::asar_api::RsiLauncherAsarData> for wire_cst_rsi_launcher_asar_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::asar_api::RsiLauncherAsarData {
|
|
crate::api::asar_api::RsiLauncherAsarData {
|
|
asar_path: self.asar_path.cst_decode(),
|
|
main_js_path: self.main_js_path.cst_decode(),
|
|
main_js_content: self.main_js_content.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::http_package::RustHttpResponse> for wire_cst_rust_http_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::http_package::RustHttpResponse {
|
|
crate::http_package::RustHttpResponse {
|
|
status_code: self.status_code.cst_decode(),
|
|
headers: self.headers.cst_decode(),
|
|
url: self.url.cst_decode(),
|
|
content_length: self.content_length.cst_decode(),
|
|
version: self.version.cst_decode(),
|
|
remote_addr: self.remote_addr.cst_decode(),
|
|
data: self.data.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::win32_api::SystemInfo> for wire_cst_system_info {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::win32_api::SystemInfo {
|
|
crate::api::win32_api::SystemInfo {
|
|
os_name: self.os_name.cst_decode(),
|
|
cpu_name: self.cpu_name.cst_decode(),
|
|
gpu_info: self.gpu_info.cst_decode(),
|
|
disk_info: self.disk_info.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::webview_api::WebViewConfiguration> for wire_cst_web_view_configuration {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::webview_api::WebViewConfiguration {
|
|
crate::api::webview_api::WebViewConfiguration {
|
|
title: self.title.cst_decode(),
|
|
width: self.width.cst_decode(),
|
|
height: self.height.cst_decode(),
|
|
user_data_folder: self.user_data_folder.cst_decode(),
|
|
enable_devtools: self.enable_devtools.cst_decode(),
|
|
transparent: self.transparent.cst_decode(),
|
|
user_agent: self.user_agent.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::webview_api::WebViewEvent> for wire_cst_web_view_event {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::webview_api::WebViewEvent {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.NavigationStarted };
|
|
crate::api::webview_api::WebViewEvent::NavigationStarted {
|
|
url: ans.url.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.NavigationCompleted };
|
|
crate::api::webview_api::WebViewEvent::NavigationCompleted {
|
|
url: ans.url.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.TitleChanged };
|
|
crate::api::webview_api::WebViewEvent::TitleChanged {
|
|
title: ans.title.cst_decode(),
|
|
}
|
|
}
|
|
3 => {
|
|
let ans = unsafe { self.kind.WebMessage };
|
|
crate::api::webview_api::WebViewEvent::WebMessage {
|
|
message: ans.message.cst_decode(),
|
|
}
|
|
}
|
|
4 => crate::api::webview_api::WebViewEvent::WindowClosed,
|
|
5 => {
|
|
let ans = unsafe { self.kind.Error };
|
|
crate::api::webview_api::WebViewEvent::Error {
|
|
message: ans.message.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::api::webview_api::WebViewNavigationState>
|
|
for wire_cst_web_view_navigation_state
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::api::webview_api::WebViewNavigationState {
|
|
crate::api::webview_api::WebViewNavigationState {
|
|
url: self.url.cst_decode(),
|
|
title: self.title.cst_decode(),
|
|
can_go_back: self.can_go_back.cst_decode(),
|
|
can_go_forward: self.can_go_forward.cst_decode(),
|
|
is_loading: self.is_loading.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_download_global_stat {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
download_speed: Default::default(),
|
|
upload_speed: Default::default(),
|
|
num_active: Default::default(),
|
|
num_waiting: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_download_global_stat {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_download_task_info {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
id: Default::default(),
|
|
name: core::ptr::null_mut(),
|
|
status: Default::default(),
|
|
total_bytes: Default::default(),
|
|
downloaded_bytes: Default::default(),
|
|
uploaded_bytes: Default::default(),
|
|
download_speed: Default::default(),
|
|
upload_speed: Default::default(),
|
|
progress: Default::default(),
|
|
num_peers: Default::default(),
|
|
output_folder: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_download_task_info {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_p_4_k_file_item {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
name: core::ptr::null_mut(),
|
|
is_directory: Default::default(),
|
|
size: Default::default(),
|
|
compressed_size: Default::default(),
|
|
date_modified: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_p_4_k_file_item {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_process_info {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
pid: Default::default(),
|
|
name: core::ptr::null_mut(),
|
|
path: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_process_info {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_record_string_string {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
field0: core::ptr::null_mut(),
|
|
field1: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_record_string_string {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_rs_process_stream_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
data_type: Default::default(),
|
|
data: core::ptr::null_mut(),
|
|
rs_pid: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_rs_process_stream_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_rsi_launcher_asar_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
asar_path: core::ptr::null_mut(),
|
|
main_js_path: core::ptr::null_mut(),
|
|
main_js_content: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_rsi_launcher_asar_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_rust_http_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
status_code: Default::default(),
|
|
headers: core::ptr::null_mut(),
|
|
url: core::ptr::null_mut(),
|
|
content_length: core::ptr::null_mut(),
|
|
version: Default::default(),
|
|
remote_addr: core::ptr::null_mut(),
|
|
data: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_rust_http_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_system_info {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
os_name: core::ptr::null_mut(),
|
|
cpu_name: core::ptr::null_mut(),
|
|
gpu_info: core::ptr::null_mut(),
|
|
disk_info: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_system_info {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_web_view_configuration {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
title: core::ptr::null_mut(),
|
|
width: Default::default(),
|
|
height: Default::default(),
|
|
user_data_folder: core::ptr::null_mut(),
|
|
enable_devtools: Default::default(),
|
|
transparent: Default::default(),
|
|
user_agent: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_web_view_configuration {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_web_view_event {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: WebViewEventKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_web_view_event {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_web_view_navigation_state {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
url: core::ptr::null_mut(),
|
|
title: core::ptr::null_mut(),
|
|
can_go_back: Default::default(),
|
|
can_go_forward: Default::default(),
|
|
is_loading: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_web_view_navigation_state {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__add_nvme_patch(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__add_nvme_patch_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__check_nvme_patch_status(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__check_nvme_patch_status_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__ort_api__clear_all_models(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__ort_api__clear_all_models_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__create_desktop_shortcut(
|
|
port_: i64,
|
|
target_path: *mut wire_cst_list_prim_u_8_strict,
|
|
shortcut_name: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__create_desktop_shortcut_impl(port_, target_path, shortcut_name)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_ips(
|
|
port_: i64,
|
|
host: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__http_api__dns_lookup_ips_impl(port_, host)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_txt(
|
|
port_: i64,
|
|
host: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__http_api__dns_lookup_txt_impl(port_, host)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__download_global_stat_default(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__download_global_stat_default_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_add_magnet(
|
|
port_: i64,
|
|
magnet_link: *mut wire_cst_list_prim_u_8_strict,
|
|
output_folder: *mut wire_cst_list_prim_u_8_strict,
|
|
trackers: *mut wire_cst_list_String,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_add_magnet_impl(
|
|
port_,
|
|
magnet_link,
|
|
output_folder,
|
|
trackers,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_add_torrent(
|
|
port_: i64,
|
|
torrent_bytes: *mut wire_cst_list_prim_u_8_loose,
|
|
output_folder: *mut wire_cst_list_prim_u_8_strict,
|
|
trackers: *mut wire_cst_list_String,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_add_torrent_impl(
|
|
port_,
|
|
torrent_bytes,
|
|
output_folder,
|
|
trackers,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_add_url(
|
|
port_: i64,
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
output_folder: *mut wire_cst_list_prim_u_8_strict,
|
|
trackers: *mut wire_cst_list_String,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_add_url_impl(
|
|
port_,
|
|
url,
|
|
output_folder,
|
|
trackers,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_clear_completed_tasks_cache(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__downloader_api__downloader_clear_completed_tasks_cache_impl()
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_get_all_tasks(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_get_all_tasks_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_get_completed_tasks_cache(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__downloader_api__downloader_get_completed_tasks_cache_impl()
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_get_global_stats(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_get_global_stats_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_get_task_info(
|
|
port_: i64,
|
|
task_id: usize,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_get_task_info_impl(port_, task_id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_has_active_tasks(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_has_active_tasks_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_has_pending_session_tasks(
|
|
working_dir: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__downloader_api__downloader_has_pending_session_tasks_impl(working_dir)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_init(
|
|
port_: i64,
|
|
working_dir: *mut wire_cst_list_prim_u_8_strict,
|
|
default_download_dir: *mut wire_cst_list_prim_u_8_strict,
|
|
upload_limit_bps: *mut u32,
|
|
download_limit_bps: *mut u32,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_init_impl(
|
|
port_,
|
|
working_dir,
|
|
default_download_dir,
|
|
upload_limit_bps,
|
|
download_limit_bps,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_is_initialized(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__downloader_api__downloader_is_initialized_impl()
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_is_name_in_task(
|
|
port_: i64,
|
|
name: *mut wire_cst_list_prim_u_8_strict,
|
|
downloading_only: *mut bool,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_is_name_in_task_impl(
|
|
port_,
|
|
name,
|
|
downloading_only,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_pause(
|
|
port_: i64,
|
|
task_id: usize,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_pause_impl(port_, task_id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_pause_all(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_pause_all_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_remove(
|
|
port_: i64,
|
|
task_id: usize,
|
|
delete_files: bool,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_remove_impl(port_, task_id, delete_files)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_remove_completed_tasks(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_remove_completed_tasks_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_resume(
|
|
port_: i64,
|
|
task_id: usize,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_resume_impl(port_, task_id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_resume_all(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_resume_all_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_shutdown(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_shutdown_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_stop(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_stop_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__downloader_api__downloader_update_speed_limits(
|
|
port_: i64,
|
|
_upload_limit_bps: *mut u32,
|
|
_download_limit_bps: *mut u32,
|
|
) {
|
|
wire__crate__api__downloader_api__downloader_update_speed_limits_impl(
|
|
port_,
|
|
_upload_limit_bps,
|
|
_download_limit_bps,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__fetch(
|
|
port_: i64,
|
|
method: i32,
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
headers: *mut wire_cst_list_record_string_string,
|
|
input_data: *mut wire_cst_list_prim_u_8_strict,
|
|
with_ip_address: *mut wire_cst_list_prim_u_8_strict,
|
|
with_custom_dns: *mut bool,
|
|
) {
|
|
wire__crate__api__http_api__fetch_impl(
|
|
port_,
|
|
method,
|
|
url,
|
|
headers,
|
|
input_data,
|
|
with_ip_address,
|
|
with_custom_dns,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_disk_physical_sector_size(
|
|
port_: i64,
|
|
drive_letter: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__get_disk_physical_sector_size_impl(port_, drive_letter)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__get_faster_url(
|
|
port_: i64,
|
|
urls: *mut wire_cst_list_String,
|
|
path_suffix: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__http_api__get_faster_url_impl(port_, urls, path_suffix)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_gpu_info_from_registry(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__get_gpu_info_from_registry_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_number_of_logical_processors(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__get_number_of_logical_processors_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_process_list_by_name(
|
|
port_: i64,
|
|
process_name: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__get_process_list_by_name_impl(port_, process_name)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_process_pid_by_name(
|
|
port_: i64,
|
|
process_name: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__get_process_pid_by_name_impl(port_, process_name)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__asar_api__get_rsi_launcher_asar_data(
|
|
port_: i64,
|
|
asar_path: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__asar_api__get_rsi_launcher_asar_data_impl(port_, asar_path)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_system_info(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__get_system_info_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__get_system_memory_size_gb(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__get_system_memory_size_gb_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__kill_process_by_name(
|
|
port_: i64,
|
|
process_name: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__kill_process_by_name_impl(port_, process_name)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__ort_api__load_translation_model(
|
|
port_: i64,
|
|
model_path: *mut wire_cst_list_prim_u_8_strict,
|
|
model_key: *mut wire_cst_list_prim_u_8_strict,
|
|
quantization_suffix: *mut wire_cst_list_prim_u_8_strict,
|
|
use_xnnpack: bool,
|
|
) {
|
|
wire__crate__api__ort_api__load_translation_model_impl(
|
|
port_,
|
|
model_path,
|
|
model_key,
|
|
quantization_suffix,
|
|
use_xnnpack,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__open_dir_with_explorer(
|
|
port_: i64,
|
|
path: *mut wire_cst_list_prim_u_8_strict,
|
|
is_file: bool,
|
|
) {
|
|
wire__crate__api__win32_api__open_dir_with_explorer_impl(port_, path, is_file)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__p4k_close(port_: i64) {
|
|
wire__crate__api__unp4k_api__p4k_close_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__p4k_extract_to_disk(
|
|
port_: i64,
|
|
file_path: *mut wire_cst_list_prim_u_8_strict,
|
|
output_path: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__unp4k_api__p4k_extract_to_disk_impl(port_, file_path, output_path)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__p4k_extract_to_memory(
|
|
port_: i64,
|
|
file_path: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__unp4k_api__p4k_extract_to_memory_impl(port_, file_path)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__p4k_get_all_files(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__unp4k_api__p4k_get_all_files_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__p4k_get_file_count(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__unp4k_api__p4k_get_file_count_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__p4k_open(
|
|
port_: i64,
|
|
p4k_path: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__unp4k_api__p4k_open_impl(port_, p4k_path)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__remove_nvme_patch(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__win32_api__remove_nvme_patch_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__resolve_shortcut(
|
|
port_: i64,
|
|
lnk_path: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__resolve_shortcut_impl(port_, lnk_path)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js(
|
|
port_: i64,
|
|
that: *mut wire_cst_rsi_launcher_asar_data,
|
|
content: *mut wire_cst_list_prim_u_8_loose,
|
|
) {
|
|
wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js_impl(port_, that, content)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__run_as_admin(
|
|
port_: i64,
|
|
program: *mut wire_cst_list_prim_u_8_strict,
|
|
args: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__run_as_admin_impl(port_, program, args)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__send_notify(
|
|
port_: i64,
|
|
summary: *mut wire_cst_list_prim_u_8_strict,
|
|
body: *mut wire_cst_list_prim_u_8_strict,
|
|
app_name: *mut wire_cst_list_prim_u_8_strict,
|
|
app_id: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__send_notify_impl(port_, summary, body, app_name, app_id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__set_default_header(
|
|
port_: i64,
|
|
headers: *mut wire_cst_list_record_string_string,
|
|
) {
|
|
wire__crate__api__http_api__set_default_header_impl(port_, headers)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__set_foreground_window(
|
|
port_: i64,
|
|
window_name: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__win32_api__set_foreground_window_impl(port_, window_name)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__rs_process__start(
|
|
port_: i64,
|
|
executable: *mut wire_cst_list_prim_u_8_strict,
|
|
arguments: *mut wire_cst_list_String,
|
|
working_directory: *mut wire_cst_list_prim_u_8_strict,
|
|
stream_sink: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__rs_process__start_impl(
|
|
port_,
|
|
executable,
|
|
arguments,
|
|
working_directory,
|
|
stream_sink,
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__start_process(
|
|
port_: i64,
|
|
program: *mut wire_cst_list_prim_u_8_strict,
|
|
args: *mut wire_cst_list_String,
|
|
) {
|
|
wire__crate__api__win32_api__start_process_impl(port_, program, args)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__ort_api__translate_text(
|
|
port_: i64,
|
|
model_key: *mut wire_cst_list_prim_u_8_strict,
|
|
text: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__ort_api__translate_text_impl(port_, model_key, text)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__ort_api__translate_text_batch(
|
|
port_: i64,
|
|
model_key: *mut wire_cst_list_prim_u_8_strict,
|
|
texts: *mut wire_cst_list_String,
|
|
) {
|
|
wire__crate__api__ort_api__translate_text_batch_impl(port_, model_key, texts)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__ort_api__unload_translation_model(
|
|
port_: i64,
|
|
model_key: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__ort_api__unload_translation_model_impl(port_, model_key)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__web_view_configuration_default(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__webview_api__web_view_configuration_default_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__web_view_navigation_state_default(
|
|
port_: i64,
|
|
) {
|
|
wire__crate__api__webview_api__web_view_navigation_state_default_impl(port_)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_close(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_close_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_create(
|
|
config: *mut wire_cst_web_view_configuration,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_create_impl(config)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_execute_script(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
script: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_execute_script_impl(id, script)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_get_state(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_get_state_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_go_back(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_go_back_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_go_forward(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_go_forward_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_is_closed(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_is_closed_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_list_all(
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_list_all_impl()
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_navigate(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_navigate_impl(id, url)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_poll_events(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_poll_events_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_reload(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_reload_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_set_visibility(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
visible: bool,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_set_visibility_impl(id, visible)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_set_window_position(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
x: i32,
|
|
y: i32,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_set_window_position_impl(id, x, y)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_set_window_size(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
width: u32,
|
|
height: u32,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_set_window_size_impl(id, width, height)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__webview_api__webview_stop(
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__api__webview_api__webview_stop_impl(id)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__rs_process__write(
|
|
port_: i64,
|
|
rs_pid: u32,
|
|
data: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__api__rs_process__write_impl(port_, rs_pid, data)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_bool(value: bool) -> *mut bool {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_rsi_launcher_asar_data(
|
|
) -> *mut wire_cst_rsi_launcher_asar_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_rsi_launcher_asar_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_u_32(value: u32) -> *mut u32 {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_u_64(value: u64) -> *mut u64 {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_web_view_configuration(
|
|
) -> *mut wire_cst_web_view_configuration {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_web_view_configuration::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_String(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_String {
|
|
let wrap = wire_cst_list_String {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<*mut wire_cst_list_prim_u_8_strict>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_download_task_info(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_download_task_info {
|
|
let wrap = wire_cst_list_download_task_info {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_download_task_info>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_p_4_k_file_item(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_p_4_k_file_item {
|
|
let wrap = wire_cst_list_p_4_k_file_item {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_p_4_k_file_item>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_prim_u_8_loose(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_prim_u_8_loose {
|
|
let ans = wire_cst_list_prim_u_8_loose {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(ans)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_prim_u_8_strict(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_prim_u_8_strict {
|
|
let ans = wire_cst_list_prim_u_8_strict {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(ans)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_process_info(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_process_info {
|
|
let wrap = wire_cst_list_process_info {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_process_info>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_record_string_string(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_record_string_string {
|
|
let wrap = wire_cst_list_record_string_string {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_record_string_string>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_web_view_event(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_web_view_event {
|
|
let wrap = wire_cst_list_web_view_event {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_web_view_event>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_download_global_stat {
|
|
download_speed: u64,
|
|
upload_speed: u64,
|
|
num_active: usize,
|
|
num_waiting: usize,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_download_task_info {
|
|
id: usize,
|
|
name: *mut wire_cst_list_prim_u_8_strict,
|
|
status: i32,
|
|
total_bytes: u64,
|
|
downloaded_bytes: u64,
|
|
uploaded_bytes: u64,
|
|
download_speed: u64,
|
|
upload_speed: u64,
|
|
progress: f64,
|
|
num_peers: usize,
|
|
output_folder: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_String {
|
|
ptr: *mut *mut wire_cst_list_prim_u_8_strict,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_download_task_info {
|
|
ptr: *mut wire_cst_download_task_info,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_p_4_k_file_item {
|
|
ptr: *mut wire_cst_p_4_k_file_item,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_prim_u_8_loose {
|
|
ptr: *mut u8,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_prim_u_8_strict {
|
|
ptr: *mut u8,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_process_info {
|
|
ptr: *mut wire_cst_process_info,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_record_string_string {
|
|
ptr: *mut wire_cst_record_string_string,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_web_view_event {
|
|
ptr: *mut wire_cst_web_view_event,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_p_4_k_file_item {
|
|
name: *mut wire_cst_list_prim_u_8_strict,
|
|
is_directory: bool,
|
|
size: u64,
|
|
compressed_size: u64,
|
|
date_modified: i64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_process_info {
|
|
pid: u32,
|
|
name: *mut wire_cst_list_prim_u_8_strict,
|
|
path: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_record_string_string {
|
|
field0: *mut wire_cst_list_prim_u_8_strict,
|
|
field1: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_rs_process_stream_data {
|
|
data_type: i32,
|
|
data: *mut wire_cst_list_prim_u_8_strict,
|
|
rs_pid: u32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_rsi_launcher_asar_data {
|
|
asar_path: *mut wire_cst_list_prim_u_8_strict,
|
|
main_js_path: *mut wire_cst_list_prim_u_8_strict,
|
|
main_js_content: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_rust_http_response {
|
|
status_code: u16,
|
|
headers: *mut wire_cst_list_record_string_string,
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
content_length: *mut u64,
|
|
version: i32,
|
|
remote_addr: *mut wire_cst_list_prim_u_8_strict,
|
|
data: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_system_info {
|
|
os_name: *mut wire_cst_list_prim_u_8_strict,
|
|
cpu_name: *mut wire_cst_list_prim_u_8_strict,
|
|
gpu_info: *mut wire_cst_list_prim_u_8_strict,
|
|
disk_info: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_web_view_configuration {
|
|
title: *mut wire_cst_list_prim_u_8_strict,
|
|
width: u32,
|
|
height: u32,
|
|
user_data_folder: *mut wire_cst_list_prim_u_8_strict,
|
|
enable_devtools: bool,
|
|
transparent: bool,
|
|
user_agent: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_web_view_event {
|
|
tag: i32,
|
|
kind: WebViewEventKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union WebViewEventKind {
|
|
NavigationStarted: wire_cst_WebViewEvent_NavigationStarted,
|
|
NavigationCompleted: wire_cst_WebViewEvent_NavigationCompleted,
|
|
TitleChanged: wire_cst_WebViewEvent_TitleChanged,
|
|
WebMessage: wire_cst_WebViewEvent_WebMessage,
|
|
Error: wire_cst_WebViewEvent_Error,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_WebViewEvent_NavigationStarted {
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_WebViewEvent_NavigationCompleted {
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_WebViewEvent_TitleChanged {
|
|
title: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_WebViewEvent_WebMessage {
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_WebViewEvent_Error {
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_web_view_navigation_state {
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
title: *mut wire_cst_list_prim_u_8_strict,
|
|
can_go_back: bool,
|
|
can_go_forward: bool,
|
|
is_loading: bool,
|
|
}
|
|
}
|
|
#[cfg(not(target_family = "wasm"))]
|
|
pub use io::*;
|