Lattice 0

Results 149 comments of Lattice 0

@Desdaemon are specializations like this already possible in Rust? Anyways, I'm beggining to take a look on the error handler and how to do this

I've just read how Isolate posting works and now I understand it better. Yes, if `arbitrary_rust_object` implements `IntoDart`, it should work. But here: ```rust impl Handler for SimpleHandler { fn...

Just did this: ```rust pub enum Error { /// Errors that implement [IntoDart]. CustomError(Box), /// Exceptional errors from panicking. Panic(Box), } pub trait Executor: RefUnwindSafe { /// Executes a Rust...

It's more complicated than we thought. Here, a `Result` is converted into `T`: ```rust pub fn try_from_syn_type(ty: &syn::Type) -> Option { match ty { syn::Type::Path(syn::TypePath { path, .. }) =>...

I'm trying with ```rust #[derive(Debug)] pub struct SupportedPathType { pub ident: syn::Ident, pub generic: Vec, } ``` instead of ```rust #[derive(Debug)] pub struct SupportedPathType { pub ident: syn::Ident, pub generic:...

Well, ```rust #[derive(Debug)] pub struct SupportedPathType { pub ident: syn::Ident, pub generic: Vec, } ``` makes it really hard to ```rust /// Converts a path type into an `IrType` if...

in order to get the `error_output`, I have to get the E from `Result` here: ```rust pub fn try_from_syn_type(ty: &syn::Type) -> Option { match ty { syn::Type::Path(syn::TypePath { path, .....

I tried exactly that, but the recursiveness of `try_from_syn_type` makes it a hell to work with, if not impossible

wow I tried exactly that afterwards: https://github.com/lattice0/flutter_rust_bridge/commit/6f5a6fb932bfb4f708bc7edb333274ec8e6aa27e but it was really hard to create the vec for all parsed types, because now I should do `vec![ty]` for each one and...

Because then `convert_path_to_ir_type` has to return a `Vec`, so collecting all the cases into vecs ("SyncReturn", "Vec", "ZeroCopyBuffer", "Box", "Option") and calling `self.convert_to_ir_type(*generic)` on a `generic` that is actually a...