Skip to content

Instantly share code, notes, and snippets.

@anidotnet
Created September 20, 2024 05:48
Show Gist options
  • Select an option

  • Save anidotnet/bec9c144c81e7270fc458e053397419d to your computer and use it in GitHub Desktop.

Select an option

Save anidotnet/bec9c144c81e7270fc458e053397419d to your computer and use it in GitHub Desktop.
Flutter Rust Bridge Error Log
RUST_LOG=debug flutter_rust_bridge_codegen generate
[2024-09-20T05:19:53.543Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/main.rs:24] cli=Cli { verbose: false, command: Generate(GenerateCommandArgs { watch: false, primary: GenerateCommandArgsPrimary { config_file: None, rust_input: None, dart_output: None, c_output: None, duplicated_c_output: None, rust_root: None, rust_output: None, dart_entrypoint_class_name: None, dart_format_line_length: None, dart_preamble: None, rust_preamble: None, no_dart_enums_style: false, no_add_mod_to_lib: false, llvm_path: None, llvm_compiler_opts: None, dart_root: None, no_build_runner: false, extra_headers: None, no_web: false, no_deps_check: false, default_external_library_loader_web_prefix: None, no_dart3: false, full_dep: false, local: false, enable_lifetime: false, type_64bit_int: false, no_default_dart_async: false, stop_on_error: false, dump: None, dump_all: false } }) }
[2024-09-20T05:19:53.545Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/config/config_parser.rs:51] Found config file flutter_rust_bridge.yaml
[2024-09-20T05:19:53.547Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/mod.rs:23] config=Config { base_dir: Some(""), rust_input: Some("crate::api"), dart_output: Some("lib/src/rust"), c_output: None, duplicated_c_output: None, rust_root: Some("rust/"), rust_output: None, dart_entrypoint_class_name: None, dart_format_line_length: None, dart_preamble: None, rust_preamble: None, dart_enums_style: None, add_mod_to_lib: None, llvm_path: None, llvm_compiler_opts: None, dart_root: None, build_runner: None, extra_headers: None, web: None, deps_check: None, dart3: None, full_dep: None, local: None, default_external_library_loader_web_prefix: None, dart_type_rename: None, enable_lifetime: Some(true), type_64bit_int: None, default_dart_async: None, stop_on_error: None, dump: None, dump_all: None } meta_config=MetaConfig { watch: false }
[2024-09-20T05:19:53.547Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/config/internal_config_parser/mod.rs:33] InternalConfig.parse base_dir="/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo"
[2024-09-20T05:19:54.047Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/mod.rs:26] internal_config=InternalConfig { controller: ControllerInternalConfig { watch: false, watching_paths: ["/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust/src"], exclude_paths: ["/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust/src/frb_generated.rs"], max_count: None }, preparer: PreparerInternalConfig { dart_root: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo", deps_check: true, needs_ffigen: false }, parser: ParserInternalConfig { hir: ParserHirInternalConfig { rust_input_namespace_pack: RustInputNamespacePack { rust_input_namespace_prefixes: [Namespace { joined_path: "crate::api" }], rust_output_path_namespace: Namespace { joined_path: "crate::frb_generated" } }, rust_crate_dir: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust", third_party_crate_names: [] }, mir: ParserMirInternalConfig { rust_input_namespace_pack: RustInputNamespacePack { rust_input_namespace_prefixes: [Namespace { joined_path: "crate::api" }], rust_output_path_namespace: Namespace { joined_path: "crate::frb_generated" } }, force_codec_mode_pack: Some(CodecModePack { dart2rust: Pde, rust2dart: Pde }), default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi, stop_on_error: false, enable_lifetime: true, type_64bit_int: false, default_dart_async: true } }, generator: GeneratorInternalConfig { api_dart: GeneratorApiDartInternalConfig { dart_enums_style: true, dart3: true, dart_decl_base_output_path: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust", dart_impl_output_path: TargetOrCommonMap { common: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust/frb_generated.dart", io: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust/frb_generated.io.dart", web: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust/frb_generated.web.dart" }, dart_entrypoint_class_name: "RustLib", dart_preamble: "", dart_type_rename: {} }, wire: GeneratorWireInternalConfig { dart: GeneratorWireDartInternalConfig { has_ffigen: false, web_enabled: true, llvm_path: ["/opt/homebrew/opt/llvm", "/usr/local/opt/llvm", "/usr/lib/llvm-9", "/usr/lib/llvm-10", "/usr/lib/llvm-11", "/usr/lib/llvm-12", "/usr/lib/llvm-13", "/usr/lib/llvm-14", "/usr/lib/", "/usr/lib64/", "C:/Program Files/llvm", "C:/msys64/mingw64"], llvm_compiler_opts: "", dart_root: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo", extra_headers: "", dart_impl_output_path: TargetOrCommonMap { common: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust/frb_generated.dart", io: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust/frb_generated.io.dart", web: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/lib/src/rust/frb_generated.web.dart" }, dart_output_class_name_pack: DartOutputClassNamePack { entrypoint_class_name: "RustLib", api_class_name: "RustLibApi", api_impl_class_name: "RustLibApiImpl", api_impl_platform_class_name: "RustLibApiImplPlatform", wire_class_name: "RustLibWire", wasm_module_name: "RustLibWasmModule" }, default_external_library_loader: GeneratorWireDartDefaultExternalLibraryLoaderInternalConfig { stem: "rust_lib_frb_demo", io_directory: "rust/target/release/", web_prefix: "pkg/" }, c_symbol_prefix: "frbgen_frb_demo_" }, rust: GeneratorWireRustInternalConfig { rust_crate_dir: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust", web_enabled: true, rust_output_path: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust/src/frb_generated.rs", c_symbol_prefix: "frbgen_frb_demo_", has_ffigen: false, default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi, rust_preamble: "" }, c: GeneratorWireCInternalConfig { enable: false, rust_crate_dir: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust", rust_output_path: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust/src/frb_generated.rs", c_output_path: None, c_symbol_prefix: "frbgen_frb_demo_" } } }, polisher: PolisherInternalConfig { duplicated_c_output_path: [], dart_format_line_length: 80, add_mod_to_lib: true, build_runner: true, web_enabled: true, dart_root: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo", rust_crate_dir: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust", rust_output_path: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust/src/frb_generated.rs", c_output_path: None, enable_auto_upgrade: true }, dumper: DumperInternalConfig { dump_contents: [], dump_directory: "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust/target/frb_dump" } }
[2024-09-20T05:19:54.049Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/utils/dart_repository/dart_repo.rs:21] Guessing toolchain the runner is run into
[2024-09-20T05:19:54.050Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:129] execute command: bin=sh args="-c \"flutter\" \"--version\"" current_dir=None cmd="sh" "-c" "\"flutter\" \"--version\""
[2024-09-20T05:19:54.595Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:140] command="sh" "-c" "\"flutter\" \"--version\"" stdout=Flutter 3.24.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5874a72aa4 (4 weeks ago) • 2024-08-20 16:46:00 -0500
Engine • revision c9b9d5780d
Tools • Dart 3.5.1 • DevTools 2.37.2
stderr=
[2024-09-20T05:19:54.596Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/cargo_expand/mod.rs:26] run_cargo_expand manifest_dir= rust_crate_dir="/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust"
[2024-09-20T05:19:54.596Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/cargo_expand/real.rs:60] Running cargo expand in '"/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust"'
[2024-09-20T05:19:54.596Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:129] execute command: bin=cargo args="expand --lib --theme=none --ugly" current_dir=Some("/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust") cmd=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust" && RUSTFLAGS="--cfg frb_expand" "cargo" "expand" "--lib" "--theme=none" "--ugly"
[2024-09-20T05:19:55.214Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:140] command=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust" && RUSTFLAGS="--cfg frb_expand" "cargo" "expand" "--lib" "--theme=none" "--ugly" stdout=#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;
pub mod api {
pub mod simple {
use std::fmt::Display;
use std::io::Error;
use async_trait::async_trait;
use flutter_rust_bridge::frb;
#[doc = "frb_encoded(235b66726228295d)"]
pub async fn greet(name: String) -> String {
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
::alloc::__export::must_use({
let res =
::alloc::fmt::format(format_args!("Hello, {0}!", name));
res
})
}
#[doc = "frb_encoded(235b66726228696e6974295d)"]
pub fn init_app() { flutter_rust_bridge::setup_default_user_utils(); }
#[doc = "frb_encoded(235b66726228295d)"]
pub struct Email {}
impl Display for Email {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>)
-> std::fmt::Result {
f.write_fmt(format_args!("Email"))
}
}
#[doc = "frb_encoded(235b66726228295d)"]
pub trait EmailService {
#[must_use]
#[allow(elided_named_lifetimes, clippy :: type_complexity, clippy
:: type_repetition_in_bounds)]
fn send_email<'life0, 'async_trait>(&'life0 self, email: Email)
->
::core::pin::Pin<Box<dyn ::core::future::Future<Output =
Result<(), Error>> + ::core::marker::Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
#[doc = "frb_encoded(235b66726228295d)"]
pub struct EmailServiceImpl {
pub dummy: i32,
}
#[doc = "frb_encoded(235b66726228295d)"]
impl EmailService for EmailServiceImpl {
#[allow(elided_named_lifetimes, clippy :: async_yields_async,
clippy :: diverging_sub_expression, clippy :: let_unit_value,
clippy :: no_effect_underscore_binding, clippy :: shadow_same,
clippy :: type_complexity, clippy :: type_repetition_in_bounds,
clippy :: used_underscore_binding)]
fn send_email<'life0, 'async_trait>(&'life0 self, email: Email)
->
::core::pin::Pin<Box<dyn ::core::future::Future<Output =
Result<(), Error>> + ::core::marker::Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait {
Box::pin(async move
{
if let ::core::option::Option::Some(__ret) =
::core::option::Option::None::<Result<(), Error>> {
#[allow(unreachable_code)]
return __ret;
}
let __self = self;
let email = email;
let __ret: Result<(), Error> =
{
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
{
::std::io::_print(format_args!("Email sent {0}\n", email));
};
Ok(())
};
#[allow(unreachable_code)]
__ret
})
}
}
}
}
mod frb_generated {
#![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)]
use crate::api::simple::EmailService;
use crate::api::simple::*;
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};
#[doc(hidden)]
pub(crate) struct FrbWrapper<T>(T);
impl<T: Clone> Clone for FrbWrapper<T> {
fn clone(&self) -> Self { FrbWrapper(self.0.clone()) }
}
impl<T: PartialEq> PartialEq for FrbWrapper<T> {
fn eq(&self, other: &Self) -> bool { self.0.eq(&other.0) }
}
impl<T: Eq> Eq for FrbWrapper<T> {}
impl<T: std::hash::Hash> std::hash::Hash for FrbWrapper<T> {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.0.hash(state)
}
}
impl<T> From<T> for FrbWrapper<T> {
fn from(t: T) -> Self { FrbWrapper(t) }
}
use std::collections::HashMap;
use std::marker::PhantomData;
use std::sync::Arc;
pub struct MoiArc<T: ?Sized + MoiArcValue> {
object_id: Option<ObjectId>,
value: Option<Arc<T>>,
_phantom: PhantomData<T>,
}
#[automatically_derived]
impl<T: ::core::fmt::Debug + ?Sized + MoiArcValue> ::core::fmt::Debug for
MoiArc<T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "MoiArc",
"object_id", &self.object_id, "value", &self.value,
"_phantom", &&self._phantom)
}
}
impl<T: ?Sized + MoiArcValue> Drop for MoiArc<T> {
fn drop(&mut self) {
if let Some(object_id) = self.object_id {
Self::decrement_strong_count(object_id);
}
}
}
impl<T: ?Sized + MoiArcValue> AsRef<T> for MoiArc<T> {
fn as_ref(&self) -> &T { self.value.as_ref().unwrap().as_ref() }
}
impl<T: ?Sized + MoiArcValue>
::flutter_rust_bridge::for_generated::BaseArc<T> for MoiArc<T> {
fn new(value: T) -> Self where T: Sized {
let mut pool = T::get_pool().write().unwrap();
let object_id = pool.id_generator.next_id();
let value = Arc::new(value);
let old_value =
pool.map.insert(object_id,
MoiArcPoolValue { ref_count: 1, value: value.clone() });
if !old_value.is_none() {
::core::panicking::panic("assertion failed: old_value.is_none()")
};
Self {
object_id: Some(object_id),
value: Some(value),
_phantom: PhantomData,
}
}
fn try_unwrap(mut self) -> Result<T, Self> where T: Sized {
let pool = &mut T::get_pool().write().unwrap();
if pool.map.get(&self.object_id.unwrap()).unwrap().ref_count == 1
{
Self::decrement_strong_count_raw(self.object_id.unwrap(),
pool);
self.object_id.take().unwrap();
Ok(Arc::into_inner(self.value.take().unwrap()).unwrap())
} else { Err(self) }
}
fn into_inner(self) -> Option<T> where T: Sized {
self.try_unwrap().ok()
}
fn into_raw(mut self) -> usize { self.object_id.take().unwrap() }
}
impl<T: ?Sized + MoiArcValue> Clone for MoiArc<T> {
fn clone(&self) -> Self {
Self::increment_strong_count(self.object_id.unwrap());
Self {
object_id: self.object_id,
value: self.value.clone(),
_phantom: PhantomData,
}
}
}
impl<T: ?Sized + MoiArcValue> MoiArc<T> {
pub(crate) fn from_raw(raw: usize) -> Self where T: Sized {
let map = &T::get_pool().read().unwrap().map;
Self {
object_id: Some(raw),
value: Some(map.get(&raw).unwrap().value.clone()),
_phantom: PhantomData,
}
}
pub fn increment_strong_count(raw: usize) {
let map = &mut T::get_pool().write().unwrap().map;
map.get_mut(&raw).unwrap().ref_count += 1;
}
pub fn decrement_strong_count(raw: usize) {
let mut pool = T::get_pool().write().unwrap();
let object = Self::decrement_strong_count_raw(raw, &mut pool);
drop(pool);
drop(object);
}
fn decrement_strong_count_raw(raw: usize,
pool: &mut MoiArcPoolInner<T>) -> Option<MoiArcPoolValue<T>> {
let value = pool.map.get_mut(&raw).unwrap();
value.ref_count -= 1;
if value.ref_count == 0 { pool.map.remove(&raw) } else { None }
}
}
pub trait MoiArcValue: 'static {
fn get_pool()
-> &'static MoiArcPool<Self>;
}
type ObjectId = usize;
pub type MoiArcPool<T> = std::sync::RwLock<MoiArcPoolInner<T>>;
pub struct MoiArcPoolInner<T: ?Sized> {
map: HashMap<ObjectId, MoiArcPoolValue<T>>,
id_generator: IdGenerator,
}
impl<T: ?Sized> Default for MoiArcPoolInner<T> {
fn default() -> Self {
Self { map: HashMap::new(), id_generator: Default::default() }
}
}
struct IdGenerator {
next_id: ObjectId,
}
impl Default for IdGenerator {
fn default() -> Self { Self { next_id: Self::MIN_ID } }
}
impl IdGenerator {
const MIN_ID: ObjectId = 1;
const MAX_ID: ObjectId = 2147483600;
fn next_id(&mut self) -> ObjectId {
let ans = self.next_id;
self.next_id =
if self.next_id >= Self::MAX_ID {
Self::MIN_ID
} else { self.next_id + 1 };
ans
}
}
impl<T: ?Sized> MoiArcPoolInner<T> {}
struct MoiArcPoolValue<T: ?Sized> {
ref_count: i32,
value: Arc<T>,
}
use ::flutter_rust_bridge::for_generated::decode_rust_opaque_nom;
fn decode_rust_opaque_moi<T: MoiArcValue + Send + Sync>(ptr: usize)
-> RustOpaqueMoi<T> {
RustOpaqueMoi::from_arc(MoiArc::<T>::from_raw(ptr))
}
use ::flutter_rust_bridge::for_generated::StdArc;
use ::flutter_rust_bridge::RustOpaqueNom;
/// Please refer to `RustOpaque` for doc.
pub type RustOpaqueMoi<T> =
::flutter_rust_bridge::for_generated::RustOpaqueBase<T, MoiArc<T>>;
/// A wrapper to support [arbitrary Rust types](https://cjycode.com/flutter_rust_bridge/guides/types/arbitrary).
pub type RustOpaque<T> = RustOpaqueMoi<T>;
use ::flutter_rust_bridge::RustAutoOpaqueNom;
/// Please refer to `RustAutoOpaque` for doc.
pub type RustAutoOpaqueMoi<T> =
::flutter_rust_bridge::for_generated::RustAutoOpaqueBase<T,
MoiArc<::flutter_rust_bridge::for_generated::RustAutoOpaqueInner<T>>>;
/// Usually this is unneeded, and just write down arbitrary types.
/// However, when you need arbitrary types at places that are not supported yet,
/// use `RustOpaqueOpaque<YourArbitraryType>`.
pub type RustAutoOpaque<T> = RustAutoOpaqueMoi<T>;
pub trait CstDecode<T> {
fn cst_decode(self)
-> T;
}
impl<T, S> CstDecode<Option<T>> for *mut S where *mut S: CstDecode<T> {
fn cst_decode(self) -> Option<T> {
(!self.is_null()).then(|| self.cst_decode())
}
}
pub trait SseDecode {
fn sse_decode(deserializer:
&mut ::flutter_rust_bridge::for_generated::SseDeserializer)
-> Self;
}
pub trait SseEncode {
fn sse_encode(self,
serializer: &mut ::flutter_rust_bridge::for_generated::SseSerializer);
}
fn transform_result_sse<T, E>(raw: Result<T, E>)
->
Result<::flutter_rust_bridge::for_generated::Rust2DartMessageSse,
::flutter_rust_bridge::for_generated::Rust2DartMessageSse> where
T: SseEncode, E: SseEncode {
use ::flutter_rust_bridge::for_generated::{Rust2DartAction, SseCodec};
match raw {
Ok(raw) =>
Ok(SseCodec::encode(Rust2DartAction::Success,
|serializer| { raw.sse_encode(serializer) })),
Err(raw) =>
Err(SseCodec::encode(Rust2DartAction::Error,
|serializer| { raw.sse_encode(serializer) })),
}
}
pub struct StreamSink<T,
Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec =
::flutter_rust_bridge::for_generated::SseCodec> {
base: ::flutter_rust_bridge::for_generated::StreamSinkBase<T,
Rust2DartCodec>,
}
#[automatically_derived]
impl<T: ::core::clone::Clone, Rust2DartCodec: ::core::clone::Clone +
::flutter_rust_bridge::for_generated::BaseCodec> ::core::clone::Clone
for StreamSink<T, Rust2DartCodec> {
#[inline]
fn clone(&self) -> StreamSink<T, Rust2DartCodec> {
StreamSink { base: ::core::clone::Clone::clone(&self.base) }
}
}
impl<T, Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec>
StreamSink<T, Rust2DartCodec> {
pub fn deserialize(raw: String) -> Self {
Self {
base: ::flutter_rust_bridge::for_generated::StreamSinkBase::deserialize(raw),
}
}
}
impl<T> StreamSink<T, ::flutter_rust_bridge::for_generated::DcoCodec> {
pub fn add<T2>(&self, value: T)
-> Result<(), ::flutter_rust_bridge::Rust2DartSendError> where
T: ::flutter_rust_bridge::IntoIntoDart<T2>,
T2: ::flutter_rust_bridge::IntoDart {
self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Success,
value)
}
pub fn add_error<TR, T2>(&self, value: TR)
-> Result<(), ::flutter_rust_bridge::Rust2DartSendError> where
TR: ::flutter_rust_bridge::IntoIntoDart<T2>,
T2: ::flutter_rust_bridge::IntoDart {
self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Error,
value)
}
fn add_raw<TR,
T2>(&self,
action: ::flutter_rust_bridge::for_generated::Rust2DartAction,
value: TR)
-> Result<(), ::flutter_rust_bridge::Rust2DartSendError> where
TR: ::flutter_rust_bridge::IntoIntoDart<T2>,
T2: ::flutter_rust_bridge::IntoDart {
self.base.add_raw(::flutter_rust_bridge::for_generated::DcoCodec::encode(action,
value.into_into_dart()))
}
}
impl<T> StreamSink<T, ::flutter_rust_bridge::for_generated::SseCodec>
where T: SseEncode {
pub fn add(&self, value: T)
-> Result<(), ::flutter_rust_bridge::Rust2DartSendError> {
self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Success,
value)
}
pub fn add_error<TR: SseEncode>(&self, value: TR)
-> Result<(), ::flutter_rust_bridge::Rust2DartSendError> {
self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Error,
value)
}
pub fn add_raw<TR: SseEncode>(&self,
action: ::flutter_rust_bridge::for_generated::Rust2DartAction,
value: TR)
-> Result<(), ::flutter_rust_bridge::Rust2DartSendError> {
self.base.add_raw(::flutter_rust_bridge::for_generated::SseCodec::encode(action,
|serializer| value.sse_encode(serializer)))
}
}
impl<T, Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec>
::flutter_rust_bridge::IntoIntoDart<StreamSink<T, Rust2DartCodec>> for
StreamSink<T, Rust2DartCodec> {
fn into_into_dart(self) -> StreamSink<T, Rust2DartCodec> {
::core::panicking::panic("internal error: entered unreachable code")
}
}
impl<T, Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec>
::flutter_rust_bridge::IntoDart for StreamSink<T, Rust2DartCodec> {
fn into_dart(self) -> ::flutter_rust_bridge::for_generated::DartAbi {
::core::panicking::panic("internal error: entered unreachable code")
}
}
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.4.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 =
1674307561;
#[allow(missing_copy_implementations)]
#[allow(non_camel_case_types)]
#[allow(dead_code)]
pub struct FLUTTER_RUST_BRIDGE_HANDLER {
__private_field: (),
}
#[doc(hidden)]
pub static FLUTTER_RUST_BRIDGE_HANDLER: FLUTTER_RUST_BRIDGE_HANDLER =
FLUTTER_RUST_BRIDGE_HANDLER { __private_field: () };
impl ::lazy_static::__Deref for FLUTTER_RUST_BRIDGE_HANDLER {
type Target =
::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool>;
fn deref(&self)
->
&::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool> {
#[inline(always)]
fn __static_ref_initialize()
->
::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool> {
{
match (&FLUTTER_RUST_BRIDGE_CODEGEN_VERSION,
&flutter_rust_bridge::for_generated::FLUTTER_RUST_BRIDGE_RUNTIME_VERSION)
{
(left_val, right_val) => {
if !(*left_val == *right_val) {
let kind = ::core::panicking::AssertKind::Eq;
::core::panicking::assert_failed(kind, &*left_val,
&*right_val,
::core::option::Option::Some(format_args!("Please ensure flutter_rust_bridge\'s codegen ({0}) and runtime ({1}) versions are the same",
FLUTTER_RUST_BRIDGE_CODEGEN_VERSION,
flutter_rust_bridge::for_generated::FLUTTER_RUST_BRIDGE_RUNTIME_VERSION)));
}
}
};
::flutter_rust_bridge::DefaultHandler::new_simple(Default::default())
}
}
#[inline(always)]
fn __stability()
->
&'static ::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool> {
static LAZY:
::lazy_static::lazy::Lazy<::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool>>
=
::lazy_static::lazy::Lazy::INIT;
LAZY.get(__static_ref_initialize)
}
__stability()
}
}
impl ::lazy_static::LazyStatic for FLUTTER_RUST_BRIDGE_HANDLER {
fn initialize(lazy: &Self) { let _ = &**lazy; }
}
fn wire__crate__api__simple__email_service_impl_send_email_impl(port_:
flutter_rust_bridge::for_generated::MessagePort,
ptr_:
flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
rust_vec_len_: i32, data_len_: i32) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::SseCodec,
_,
_>(flutter_rust_bridge::for_generated::TaskInfo {
debug_name: "email_service_impl_send_email",
port: Some(port_),
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
},
move ||
{
let message =
unsafe {
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
rust_vec_len_, data_len_)
};
let mut deserializer =
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
let api_that =
<crate::api::simple::EmailServiceImpl>::sse_decode(&mut deserializer);
let api_email =
<crate::api::simple::Email>::sse_decode(&mut deserializer);
deserializer.end();
move |context|
{
transform_result_sse::<_,
()>((move ||
{
let output_ok =
Result::<_,
()>::Ok(crate::api::simple::EmailServiceImpl::send_email(&api_that,
api_email))?;
Ok(output_ok)
})())
}
})
}
fn wire__crate__api__simple__greet_impl(port_:
flutter_rust_bridge::for_generated::MessagePort,
ptr_:
flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
rust_vec_len_: i32, data_len_: i32) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec,
_, _,
_>(flutter_rust_bridge::for_generated::TaskInfo {
debug_name: "greet",
port: Some(port_),
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
},
move ||
{
let message =
unsafe {
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
rust_vec_len_, data_len_)
};
let mut deserializer =
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
let api_name = <String>::sse_decode(&mut deserializer);
deserializer.end();
move |context|
async move
{
transform_result_sse::<_,
()>((move ||
async move
{
let output_ok =
Result::<_,
()>::Ok(crate::api::simple::greet(api_name).await)?;
Ok(output_ok)
})().await)
}
})
}
fn wire__crate__api__simple__init_app_impl(port_:
flutter_rust_bridge::for_generated::MessagePort,
ptr_:
flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
rust_vec_len_: i32, data_len_: i32) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::SseCodec,
_,
_>(flutter_rust_bridge::for_generated::TaskInfo {
debug_name: "init_app",
port: Some(port_),
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
},
move ||
{
let message =
unsafe {
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
rust_vec_len_, data_len_)
};
let mut deserializer =
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
deserializer.end();
move |context|
{
transform_result_sse::<_,
()>((move ||
{
let output_ok =
Result::<_, ()>::Ok({ crate::api::simple::init_app(); })?;
Ok(output_ok)
})())
}
})
}
impl MoiArcValue for
flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>> {
fn get_pool() -> &'static MoiArcPool<Self> {
#[allow(missing_copy_implementations)]
#[allow(non_camel_case_types)]
#[allow(dead_code)]
struct POOL {
__private_field: (),
}
#[doc(hidden)]
static POOL: POOL = POOL { __private_field: () };
impl ::lazy_static::__Deref for POOL {
type Target =
MoiArcPool<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>>;
fn deref(&self)
->
&MoiArcPool<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>> {
#[inline(always)]
fn __static_ref_initialize()
->
MoiArcPool<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>> {
MoiArcPool::new(Default::default())
}
#[inline(always)]
fn __stability()
->
&'static MoiArcPool<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>> {
static LAZY:
::lazy_static::lazy::Lazy<MoiArcPool<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>>> =
::lazy_static::lazy::Lazy::INIT;
LAZY.get(__static_ref_initialize)
}
__stability()
}
}
impl ::lazy_static::LazyStatic for POOL {
fn initialize(lazy: &Self) { let _ = &**lazy; }
}
;
&POOL
}
}
impl SseDecode for
::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
let mut inner =
<RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send +
'async_trait>>>>>::sse_decode(deserializer);
return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner);
}
}
impl SseDecode for
RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>> {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
let mut inner = <usize>::sse_decode(deserializer);
return decode_rust_opaque_moi(inner);
}
}
impl SseDecode for String {
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 crate::api::simple::Email {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
return crate::api::simple::Email {};
}
}
impl SseDecode for crate::api::simple::EmailServiceImpl {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
let mut var_dummy = <i32>::sse_decode(deserializer);
return crate::api::simple::EmailServiceImpl { dummy: var_dummy };
}
}
impl SseDecode for i32 {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
deserializer.cursor.read_i32::<NativeEndian>().unwrap()
}
}
impl SseDecode for Vec<u8> {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
let mut len_ = <i32>::sse_decode(deserializer);
let mut ans_ = ::alloc::vec::Vec::new();
for idx_ in 0..len_ { ans_.push(<u8>::sse_decode(deserializer)); }
return ans_;
}
}
impl SseDecode for u8 {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
deserializer.cursor.read_u8().unwrap()
}
}
impl SseDecode for () {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {}
}
impl SseDecode for usize {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
deserializer.cursor.read_u64::<NativeEndian>().unwrap() as _
}
}
impl SseDecode for bool {
fn sse_decode(deserializer:
&mut flutter_rust_bridge::for_generated::SseDeserializer)
-> Self {
deserializer.cursor.read_u8().unwrap() != 0
}
}
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) {
match func_id {
2 =>
wire__crate__api__simple__email_service_impl_send_email_impl(port,
ptr, rust_vec_len, data_len),
3 =>
wire__crate__api__simple__greet_impl(port, ptr, rust_vec_len,
data_len),
4 =>
wire__crate__api__simple__init_app_impl(port, ptr,
rust_vec_len, data_len),
_ =>
::core::panicking::panic("internal error: entered unreachable code"),
}
}
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 {
match func_id {
_ =>
::core::panicking::panic("internal error: entered unreachable code"),
}
}
impl flutter_rust_bridge::IntoDart for
FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send +
'async_trait>>> {
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_,
MoiArc<_>>(self.0).into_dart()
}
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for
FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send +
'async_trait>>> {}
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>> for
::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
fn into_into_dart(self)
->
FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> +
Send + 'async_trait>>> {
self.into()
}
}
impl flutter_rust_bridge::IntoDart for crate::api::simple::Email {
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
Vec::<u8>::new().into_dart()
}
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for
crate::api::simple::Email {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::simple::Email> for
crate::api::simple::Email {
fn into_into_dart(self) -> crate::api::simple::Email { self }
}
impl flutter_rust_bridge::IntoDart for
crate::api::simple::EmailServiceImpl {
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
[self.dummy.into_into_dart().into_dart()].into_dart()
}
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for
crate::api::simple::EmailServiceImpl {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::simple::EmailServiceImpl>
for crate::api::simple::EmailServiceImpl {
fn into_into_dart(self) -> crate::api::simple::EmailServiceImpl {
self
}
}
impl SseEncode for
::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
<RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send +
'async_trait>>>>>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_,
MoiArc<_>>(self), serializer);
}
}
impl SseEncode for
RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send + 'async_trait>>>> {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
let (ptr, size) = self.sse_encode_raw();
<usize>::sse_encode(ptr, serializer);
<i32>::sse_encode(size, serializer);
}
}
impl SseEncode for String {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
<Vec<u8>>::sse_encode(self.into_bytes(), serializer);
}
}
impl SseEncode for crate::api::simple::Email {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {}
}
impl SseEncode for crate::api::simple::EmailServiceImpl {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
<i32>::sse_encode(self.dummy, serializer);
}
}
impl SseEncode for i32 {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
serializer.cursor.write_i32::<NativeEndian>(self).unwrap();
}
}
impl SseEncode for Vec<u8> {
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 u8 {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
serializer.cursor.write_u8(self).unwrap();
}
}
impl SseEncode for () {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {}
}
impl SseEncode for usize {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
serializer.cursor.write_u64::<NativeEndian>(self as _).unwrap();
}
}
impl SseEncode for bool {
fn sse_encode(self,
serializer:
&mut flutter_rust_bridge::for_generated::SseSerializer) {
serializer.cursor.write_u8(self as _).unwrap();
}
}
#[cfg(not(target_family = "wasm"))]
mod io {
use super::*;
use crate::api::simple::EmailService;
use crate::api::simple::*;
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};
pub trait NewWithNullPtr {
fn new_with_null_ptr()
-> Self;
}
impl<T> NewWithNullPtr for *mut T {
fn new_with_null_ptr() -> Self { std::ptr::null_mut() }
}
#[no_mangle]
pub extern "C" fn frb_get_rust_content_hash() -> i32 {
FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH
}
#[no_mangle]
pub extern "C" fn frb_pde_ffi_dispatcher_primary(func_id: i32,
port_: i64, ptr_: *mut u8, rust_vec_len_: i32, data_len_: i32) {
pde_ffi_dispatcher_primary_impl(func_id, port_, ptr_,
rust_vec_len_, data_len_)
}
#[no_mangle]
pub extern "C" fn frb_pde_ffi_dispatcher_sync(func_id: i32,
ptr_: *mut u8, rust_vec_len_: i32, data_len_: i32)
-> ::flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
pde_ffi_dispatcher_sync_impl(func_id, ptr_, rust_vec_len_,
data_len_)
}
#[no_mangle]
pub extern "C" fn dart_fn_deliver_output(call_id: i32, ptr_: *mut u8,
rust_vec_len_: i32, data_len_: i32) {
let message =
unsafe {
::flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
rust_vec_len_, data_len_)
};
FLUTTER_RUST_BRIDGE_HANDLER.dart_fn_handle_output(call_id,
message)
}
#[no_mangle]
pub extern "C" fn frbgen_frb_demo_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPinBoxFutureOutputResultErrorSendasync_trait(ptr:
*const std::ffi::c_void) {
MoiArc::<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send +
'async_trait>>>>::increment_strong_count(ptr as _);
}
#[no_mangle]
pub extern "C" fn frbgen_frb_demo_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPinBoxFutureOutputResultErrorSendasync_trait(ptr:
*const std::ffi::c_void) {
MoiArc::<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<::Pin<Box<Future<Output
= Result<(), Error>> + Send +
'async_trait>>>>::decrement_strong_count(ptr as _);
}
}
#[cfg(not(target_family = "wasm"))]
pub use io::*;
}
pub mod core {
pub mod email {
use std::io::Error;
use async_trait::async_trait;
use flutter_rust_bridge::frb;
}
}
stderr= Checking rust_lib_frb_demo v0.1.0 (/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust)
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:162:63
|
160 | / flutter_rust_bridge::frb_generated_moi_arc_impl_value!(
161 | | flutter_rust_bridge::for_generated::RustAutoOpaqueInner<
162 | | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| | ^^^^^^^^^^^^ undeclared lifetime
163 | | >
164 | | );
| |_- lifetime `'async_trait` is missing in item created through this procedural macro
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:162:63
|
160 | / flutter_rust_bridge::frb_generated_moi_arc_impl_value!(
161 | | flutter_rust_bridge::for_generated::RustAutoOpaqueInner<
162 | | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| | ^^^^^^^^^^^^ undeclared lifetime
163 | | >
164 | | );
| | -
| | |
| |_lifetime `'async_trait` is missing in item created through this procedural macro
| help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:162:63
|
162 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:168:74
|
168 | impl SseDecode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| - ^^^^^^^^^^^^ undeclared lifetime
| |
| help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:173:71
|
173 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
|
help: consider introducing lifetime `'async_trait` here
|
170 | fn sse_decode<'async_trait>(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
| ++++++++++++++
help: consider introducing lifetime `'async_trait` here
|
168 | impl<'async_trait> SseDecode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ++++++++++++++
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:183:67
|
180 | impl SseDecode
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
...
183 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:299:74
|
298 | impl flutter_rust_bridge::IntoDart
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
299 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:307:74
|
306 | impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
307 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:313:74
|
311 | impl
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
312 | flutter_rust_bridge::IntoIntoDart<
313 | FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>,
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:314:65
|
311 | impl
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
...
314 | > for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:318:75
|
318 | ) -> FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>> {
| ^^^^^^^^^^^^ undeclared lifetime
|
help: consider introducing lifetime `'async_trait` here
|
316 | fn into_into_dart<'async_trait>(
| ++++++++++++++
help: consider introducing lifetime `'async_trait` here
|
311 | impl<'async_trait>
| ++++++++++++++
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:353:74
|
353 | impl SseEncode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| - ^^^^^^^^^^^^ undeclared lifetime
| |
| help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:358:71
|
358 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
|
help: consider introducing lifetime `'async_trait` here
|
355 | fn sse_encode<'async_trait>(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
| ++++++++++++++
help: consider introducing lifetime `'async_trait` here
|
353 | impl<'async_trait> SseEncode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ++++++++++++++
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:370:67
|
367 | impl SseEncode
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
...
370 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:473:71
|
468 | ...rong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPinBoxFutureOutputResultErrorSendasync_trait(
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
...
473 | ...> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'async_trait`
--> src/frb_generated.rs:484:71
|
479 | ...rong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPinBoxFutureOutputResultErrorSendasync_trait(
| - help: consider introducing lifetime `'async_trait` here: `<'async_trait>`
...
484 | ...> + Send + 'async_trait>>,
| ^^^^^^^^^^^^ undeclared lifetime
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:162:11
|
162 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
162 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
162 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:162:19
|
162 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:162:46
|
162 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:168:22
|
168 | impl SseDecode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
168 - impl SseDecode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
168 + impl SseDecode for Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:168:30
|
168 | impl SseDecode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:168:57
|
168 | impl SseDecode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:173:19
|
173 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
173 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
173 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:173:27
|
173 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:173:54
|
173 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:183:15
|
183 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
183 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
183 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:183:23
|
183 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:183:50
|
183 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:299:22
|
299 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
299 - for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
299 + for FrbWrapper<Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:299:30
|
299 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:299:57
|
299 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:307:22
|
307 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
307 - for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
307 + for FrbWrapper<Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:307:30
|
307 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:307:57
|
307 | for FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:313:22
|
313 | FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
313 - FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>,
313 + FrbWrapper<Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:313:30
|
313 | FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:313:57
|
313 | FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:314:13
|
314 | > for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
314 - > for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>
314 + > for Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:314:21
|
314 | > for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:314:48
|
314 | > for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:318:23
|
318 | ) -> FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>> {
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
318 - ) -> FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>> {
318 + ) -> FrbWrapper<Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>> {
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:318:31
|
318 | ) -> FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>> {
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:318:58
|
318 | ) -> FrbWrapper<::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>> {
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:353:22
|
353 | impl SseEncode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
353 - impl SseEncode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
353 + impl SseEncode for Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:353:30
|
353 | impl SseEncode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:353:57
|
353 | impl SseEncode for ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>> {
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:358:19
|
358 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
358 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
358 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:358:27
|
358 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:358:54
|
358 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:370:15
|
370 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
28 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
370 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
370 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:370:23
|
370 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
28 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:370:50
|
370 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
28 + use std::error::Error;
|
28 + use std::fmt::Error;
|
28 + use std::io::Error;
|
28 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:473:19
|
473 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
454 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
473 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
473 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:473:27
|
473 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
454 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:473:54
|
473 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
454 + use std::error::Error;
|
454 + use std::fmt::Error;
|
454 + use std::io::Error;
|
454 + use core::error::Error;
|
and 3 other candidates
error[E0412]: cannot find crate `Pin` in the list of imported crates
--> src/frb_generated.rs:484:19
|
484 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^ not found in the list of imported crates
|
help: consider importing this struct
|
454 + use std::pin::Pin;
|
help: if you import `Pin`, refer to it directly
|
484 - ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
484 + Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
|
error[E0405]: cannot find trait `Future` in this scope
--> src/frb_generated.rs:484:27
|
484 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^^ not found in this scope
|
help: consider importing this trait
|
454 + use std::future::Future;
|
error[E0412]: cannot find type `Error` in this scope
--> src/frb_generated.rs:484:54
|
484 | ::Pin<Box<Future<Output = Result<(), Error>> + Send + 'async_trait>>,
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
454 + use std::error::Error;
|
454 + use std::fmt::Error;
|
454 + use std::io::Error;
|
454 + use core::error::Error;
|
and 3 other candidates
warning: unused import: `std::io::Error`
--> src/core/email.rs:2:5
|
2 | use std::io::Error;
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `async_trait::async_trait`
--> src/core/email.rs:3:5
|
3 | use async_trait::async_trait;
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `flutter_rust_bridge::frb`
--> src/core/email.rs:4:5
|
4 | use flutter_rust_bridge::frb;
| ^^^^^^^^^^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0261, E0405, E0412.
For more information about an error, try `rustc --explain E0261`.
[2024-09-20T05:19:55.231Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/hir/flat/parser/syn_item/item_struct_or_enum.rs:36] parse_syn_item_struct_or_enum item_ident=Ident { sym: Email, span: bytes(739..744) }
[2024-09-20T05:19:55.231Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/hir/flat/parser/syn_item/item_struct_or_enum.rs:36] parse_syn_item_struct_or_enum item_ident=Ident { sym: EmailServiceImpl, span: bytes(1517..1533) }
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=i32 ans=Primitive(I32)
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "send_email"
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=send_email inputs_lifetimes=[[Lifetime("life0")], []] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false, false] }
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailService ans=TraitDef(MirTypeTraitDef { name: NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailService" } })
[2024-09-20T05:19:55.232Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=:: core :: pin :: Pin < Box < dyn :: core :: future :: Future < Output = Result < () , Error > > + :: core :: marker :: Send + 'async_trait > > ans=RustAutoOpaqueImplicit(MirTypeRustAutoOpaqueImplicit { ownership_mode: Owned, inner: MirTypeRustOpaque { namespace: Namespace { joined_path: "crate::api::simple" }, inner: MirRustOpaqueInner(MirLifetimeAwareType { raw: "flutter_rust_bridge::for_generated::RustAutoOpaqueInner<:: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >>" }), codec: Moi, dart_api_type: None, brief_name: true }, raw: MirRustAutoOpaqueRaw { string: MirLifetimeAwareType { raw: ":: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >" }, segments: [NameComponent { ident: "core", args: [] }, NameComponent { ident: "pin", args: [] }, NameComponent { ident: "Pin", args: [Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Box, span: bytes(1272..1275) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::TraitObject { dyn_token: Some(Dyn), bounds: [TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(1282..1286) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: future, span: bytes(1288..1294) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Future, span: bytes(1296..1302) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::AssocType(AssocType { ident: Ident { sym: Output, span: bytes(1303..1309) }, generics: None, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Result, span: bytes(1328..1334) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Tuple { paren_token: Paren, elems: [] }), Comma, GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Error, span: bytes(1339..1344) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } } })], gt_token: Gt } }] } }), Plus, TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(1351..1355) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: marker, span: bytes(1357..1363) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Send, span: bytes(1365..1369) }, arguments: PathArguments::None }] } }), Plus, TypeParamBound::Lifetime { apostrophe: bytes(1372..1373), ident: Ident { sym: async_trait, span: bytes(1373..1384) } }] })], gt_token: Gt } }] } }] }] }, reason: None, ignore: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "send_email"
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=send_email inputs_lifetimes=[[Lifetime("life0")], []] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false, false] }
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=:: core :: pin :: Pin < Box < dyn :: core :: future :: Future < Output = Result < () , Error > > + :: core :: marker :: Send + 'async_trait > > ans=RustAutoOpaqueImplicit(MirTypeRustAutoOpaqueImplicit { ownership_mode: Owned, inner: MirTypeRustOpaque { namespace: Namespace { joined_path: "crate::api::simple" }, inner: MirRustOpaqueInner(MirLifetimeAwareType { raw: "flutter_rust_bridge::for_generated::RustAutoOpaqueInner<:: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >>" }), codec: Moi, dart_api_type: None, brief_name: true }, raw: MirRustAutoOpaqueRaw { string: MirLifetimeAwareType { raw: ":: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >" }, segments: [NameComponent { ident: "core", args: [] }, NameComponent { ident: "pin", args: [] }, NameComponent { ident: "Pin", args: [Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Box, span: bytes(2119..2122) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::TraitObject { dyn_token: Some(Dyn), bounds: [TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(2129..2133) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: future, span: bytes(2135..2141) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Future, span: bytes(2143..2149) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::AssocType(AssocType { ident: Ident { sym: Output, span: bytes(2150..2156) }, generics: None, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Result, span: bytes(2179..2185) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Tuple { paren_token: Paren, elems: [] }), Comma, GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Error, span: bytes(2190..2195) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } } })], gt_token: Gt } }] } }), Plus, TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(2202..2206) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: marker, span: bytes(2208..2214) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Send, span: bytes(2216..2220) }, arguments: PathArguments::None }] } }), Plus, TypeParamBound::Lifetime { apostrophe: bytes(2223..2224), ident: Ident { sym: async_trait, span: bytes(2224..2235) } }] })], gt_token: Gt } }] } }] }] }, reason: None, ignore: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "greet"
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=greet inputs_lifetimes=[[]] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false] }
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "init_app"
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=init_app inputs_lifetimes=[] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [] }
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.233Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.234Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.234Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=i32 ans=Primitive(I32)
[2024-09-20T05:19:55.234Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "send_email"
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=send_email inputs_lifetimes=[[Lifetime("life0")], []] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false, false] }
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailService ans=TraitDef(MirTypeTraitDef { name: NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailService" } })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=:: core :: pin :: Pin < Box < dyn :: core :: future :: Future < Output = Result < () , Error > > + :: core :: marker :: Send + 'async_trait > > ans=RustAutoOpaqueImplicit(MirTypeRustAutoOpaqueImplicit { ownership_mode: Owned, inner: MirTypeRustOpaque { namespace: Namespace { joined_path: "crate::api::simple" }, inner: MirRustOpaqueInner(MirLifetimeAwareType { raw: "flutter_rust_bridge::for_generated::RustAutoOpaqueInner<:: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >>" }), codec: Moi, dart_api_type: None, brief_name: true }, raw: MirRustAutoOpaqueRaw { string: MirLifetimeAwareType { raw: ":: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >" }, segments: [NameComponent { ident: "core", args: [] }, NameComponent { ident: "pin", args: [] }, NameComponent { ident: "Pin", args: [Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Box, span: bytes(1272..1275) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::TraitObject { dyn_token: Some(Dyn), bounds: [TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(1282..1286) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: future, span: bytes(1288..1294) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Future, span: bytes(1296..1302) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::AssocType(AssocType { ident: Ident { sym: Output, span: bytes(1303..1309) }, generics: None, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Result, span: bytes(1328..1334) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Tuple { paren_token: Paren, elems: [] }), Comma, GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Error, span: bytes(1339..1344) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } } })], gt_token: Gt } }] } }), Plus, TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(1351..1355) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: marker, span: bytes(1357..1363) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Send, span: bytes(1365..1369) }, arguments: PathArguments::None }] } }), Plus, TypeParamBound::Lifetime { apostrophe: bytes(1372..1373), ident: Ident { sym: async_trait, span: bytes(1373..1384) } }] })], gt_token: Gt } }] } }] }] }, reason: None, ignore: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "send_email"
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=send_email inputs_lifetimes=[[Lifetime("life0")], []] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false, false] }
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=:: core :: pin :: Pin < Box < dyn :: core :: future :: Future < Output = Result < () , Error > > + :: core :: marker :: Send + 'async_trait > > ans=RustAutoOpaqueImplicit(MirTypeRustAutoOpaqueImplicit { ownership_mode: Owned, inner: MirTypeRustOpaque { namespace: Namespace { joined_path: "crate::api::simple" }, inner: MirRustOpaqueInner(MirLifetimeAwareType { raw: "flutter_rust_bridge::for_generated::RustAutoOpaqueInner<:: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >>" }), codec: Moi, dart_api_type: None, brief_name: true }, raw: MirRustAutoOpaqueRaw { string: MirLifetimeAwareType { raw: ":: Pin < Box < Future < Output = Result < () , Error > > + Send + 'async_trait > >" }, segments: [NameComponent { ident: "core", args: [] }, NameComponent { ident: "pin", args: [] }, NameComponent { ident: "Pin", args: [Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Box, span: bytes(2119..2122) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::TraitObject { dyn_token: Some(Dyn), bounds: [TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(2129..2133) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: future, span: bytes(2135..2141) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Future, span: bytes(2143..2149) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::AssocType(AssocType { ident: Ident { sym: Output, span: bytes(2150..2156) }, generics: None, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Result, span: bytes(2179..2185) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Tuple { paren_token: Paren, elems: [] }), Comma, GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Error, span: bytes(2190..2195) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } } })], gt_token: Gt } }] } }), Plus, TypeParamBound::Trait(TraitBound { paren_token: None, modifier: TraitBoundModifier::None, lifetimes: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: core, span: bytes(2202..2206) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: marker, span: bytes(2208..2214) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: Send, span: bytes(2216..2220) }, arguments: PathArguments::None }] } }), Plus, TypeParamBound::Lifetime { apostrophe: bytes(2223..2224), ident: Ident { sym: async_trait, span: bytes(2224..2235) } }] })], gt_token: Gt } }] } }] }] }, reason: None, ignore: false })
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "greet"
[2024-09-20T05:19:55.235Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=greet inputs_lifetimes=[[]] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false] }
[2024-09-20T05:19:55.236Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2024-09-20T05:19:55.236Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2024-09-20T05:19:55.236Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/mod.rs:139] parse_function function name: "init_app"
[2024-09-20T05:19:55.236Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/function/real/lifetime.rs:36] parse_function_lifetime name=init_app inputs_lifetimes=[] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [] }
[2024-09-20T05:19:55.236Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=Email ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "Email" }), is_exception: false })
[2024-09-20T05:19:55.236Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/codegen/parser/mir/parser/ty/ty.rs:12] TypeParserWithContext.parse_type ty=EmailServiceImpl ans=StructRef(MirTypeStructRef { ident: MirStructIdent(NamespacedName { namespace: Namespace { joined_path: "crate::api::simple" }, name: "EmailServiceImpl" }), is_exception: false })
[2024-09-20T05:19:55.241Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/dart_fix.rs:10] execute dart_fix
[2024-09-20T05:19:55.241Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:129] execute command: bin=sh args="-c \"dart\" \"fix\" \"--apply\"" current_dir=Some("/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo") cmd=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo" && "sh" "-c" "\"dart\" \"fix\" \"--apply\""
[2024-09-20T05:19:59.422Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:140] command=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo" && "sh" "-c" "\"dart\" \"fix\" \"--apply\"" stdout=Computing fixes in frb_demo...
Applying fixes...
lib/src/rust/frb_generated.dart
prefer_const_constructors - 2 fixes
prefer_is_empty - 1 fix
3 fixes made in 1 file.
stderr=
[2024-09-20T05:19:59.422Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/dart_format.rs:23] execute dart_format paths=["lib/src/rust/frb_generated.dart", "lib/src/rust/frb_generated.io.dart", "lib/src/rust/frb_generated.web.dart", "lib/src/rust/api/simple.dart"] line_length=80
[2024-09-20T05:19:59.422Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:129] execute command: bin=sh args="-c \"dart\" \"format\" \"--line-length\" \"80\" \"lib/src/rust/frb_generated.dart\" \"lib/src/rust/frb_generated.io.dart\" \"lib/src/rust/frb_generated.web.dart\" \"lib/src/rust/api/simple.dart\"" current_dir=Some("/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo") cmd=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo" && "sh" "-c" "\"dart\" \"format\" \"--line-length\" \"80\" \"lib/src/rust/frb_generated.dart\" \"lib/src/rust/frb_generated.io.dart\" \"lib/src/rust/frb_generated.web.dart\" \"lib/src/rust/api/simple.dart\""
[2024-09-20T05:19:59.972Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:140] command=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo" && "sh" "-c" "\"dart\" \"format\" \"--line-length\" \"80\" \"lib/src/rust/frb_generated.dart\" \"lib/src/rust/frb_generated.io.dart\" \"lib/src/rust/frb_generated.web.dart\" \"lib/src/rust/api/simple.dart\"" stdout=Formatted lib/src/rust/frb_generated.dart
Formatted lib/src/rust/frb_generated.io.dart
Formatted lib/src/rust/frb_generated.web.dart
Formatted lib/src/rust/api/simple.dart
Formatted 4 files (4 changed) in 0.17 seconds.
stderr=
[2024-09-20T05:19:59.972Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/format_rust.rs:9] execute format_rust paths=["src/frb_generated.rs"]
[2024-09-20T05:19:59.972Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:129] execute command: bin=sh args="-c \"rustfmt\" \"--edition\" \"2018\" \"src/frb_generated.rs\"" current_dir=Some("/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust") cmd=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust" && "sh" "-c" "\"rustfmt\" \"--edition\" \"2018\" \"src/frb_generated.rs\""
[2024-09-20T05:20:00.086Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/commands/command_runner.rs:140] command=cd "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo/rust" && "sh" "-c" "\"rustfmt\" \"--edition\" \"2018\" \"src/frb_generated.rs\"" stdout= stderr=
[2024-09-20T05:20:00.086Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/utils/dart_repository/dart_repo.rs:21] Guessing toolchain the runner is run into
[2024-09-20T05:20:00.087Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/utils/dart_repository/dart_repo.rs:68] Checking presence of flutter_rust_bridge in dependencies at "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo"
[2024-09-20T05:20:00.087Z DEBUG /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.4.0/src/library/utils/dart_repository/dart_repo.rs:93] Checking presence of flutter_rust_bridge in dependencies at "/Users/user1/development/codebase/workbench/flutter_workbench/frb_demo"
[0.6s] Parse
└── [0.6s] Cargo expand & syn parse
└── [0.0s] Parse HIR
└── [0.0s] Parse MIR
[0.0s] Generate
[4.8s] Polish
└── [4.2s] Run Dart fix
└── [0.5s] Run Dart formatter
└── [0.1s] Run Rust formatter
└── [0.0s] Auto upgrade Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment