We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be nice and convinient for building reqwest based API
The text was updated successfully, but these errors were encountered:
Okay, i already found my own solution for this. specta already support url. (in some way)
specta
url
My problem is that :
use url::Url; use specta::Type; #[derive(Type)] pub struct BsxTitleData { pub title: String, pub url: Url, pub image: Url, pub rating: f64, }
I can't compile because url::Url doesn't implement the Type trait from specta
url::Url
Type
I tried to implement to my own code but it didn't work 😒.
But i found the solution, that solve partially the problem.
#[specta(type = String)]
so the struct above should be like this:
use url::Url; use specta::Type; #[derive(Type)] pub struct BsxTitleData { pub title: String, #[specta(type = String)] pub url: Url, #[specta(type = String)] pub image: Url, pub rating: f64, }
Note : It seems to compile and export very well to typescript but i'm not sure if it works with tauri.
Sorry, something went wrong.
No branches or pull requests
It would be nice and convinient for building reqwest based API
The text was updated successfully, but these errors were encountered: