question about impl Trait
as arg
#866
Replies: 4 comments 5 replies
-
IIRC |
Beta Was this translation helpful? Give feedback.
-
through repo https://github.com/huang12zheng/flutter_rust_bridge/tree/debug with Very dirty and ugly code use crate::api::*;
use serde::{Serialize, Serializer};
pub enum SerializeEnum {
Record(Record),
SerEnum(SerEnum),
}
impl Serialize for SerializeEnum {
fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
match *self {
SerializeEnum::Record(ref __field0) => __field0.serialize(__serializer),
SerializeEnum::SerEnum(ref __field0) => __field0.serialize(__serializer),
}
}
} it happen in https://github.com/huang12zheng/flutter_rust_bridge/blob/debug/frb_codegen/src/utils.rs#L168 but There are still a lot of error in bridge_generated. -_-||
need to be fn wire_tt_impl(port_: MessagePort, t: impl Wire2Api<SerializeEnum> + UnwindSafe) {
to
|
Beta Was this translation helpful? Give feedback.
-
Looking for places to realize traits, Each trait cound generates a corresponding entity enum. |
Beta Was this translation helpful? Give feedback.
-
input:
would get error
so,
Is it in the following way?
a error case(you can ignore)
make it to a correct one:
Beta Was this translation helpful? Give feedback.
All reactions