bump: flutter_rust_bridge: ^2.0.0-dev.31

This commit is contained in:
2024-04-11 19:52:13 +08:00
parent cdbf4d7812
commit df54a44e0e
13 changed files with 234 additions and 37 deletions

View File

@ -11,7 +11,7 @@ strip = "debuginfo"
crate-type = ["cdylib", "staticlib"]
[dependencies]
flutter_rust_bridge = "=2.0.0-dev.30"
flutter_rust_bridge = "=2.0.0-dev.31"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] }
url = "2.5"
async-std = "1.12"

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31.
// Section: imports
@ -31,6 +31,15 @@ impl CstDecode<std::collections::HashMap<String, String>>
vec.into_iter().collect()
}
}
impl CstDecode<StreamSink<String, 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<String, 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 {
@ -167,8 +176,9 @@ pub extern "C" fn frbgen_starcitizen_doctor_wire_start_process(
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_start_process_impl(port_, executable, arguments, working_directory)
wire_start_process_impl(port_, executable, arguments, working_directory, stream_sink)
}
#[no_mangle]

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28.
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31.
#![allow(
non_camel_case_types,
@ -30,7 +30,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
default_rust_opaque = RustOpaqueNom,
default_rust_auto_opaque = RustAutoOpaqueNom,
);
const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.28";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.31";
// Section: executor
@ -143,17 +143,19 @@ fn wire_start_process_impl(
executable: impl CstDecode<String>,
arguments: impl CstDecode<Vec<String>>,
working_directory: impl CstDecode<String>,
stream_sink: impl CstDecode<StreamSink<String, 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_process",
port: Some(port_),
mode: flutter_rust_bridge::for_generated::FfiCallMode::Stream,
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 {
@ -162,9 +164,7 @@ fn wire_start_process_impl(
api_executable,
api_arguments,
api_working_directory,
StreamSink::new(
context.rust2dart_context().stream_sink::<_, String>(),
),
api_stream_sink,
)
.await,
)
@ -248,6 +248,14 @@ impl SseDecode for std::collections::HashMap<String, String> {
}
}
impl SseDecode for StreamSink<String, 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 {
@ -563,6 +571,13 @@ impl SseEncode for std::collections::HashMap<String, String> {
}
}
impl SseEncode for StreamSink<String, 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) {