Skip to content
New issue

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

How to use use specta::Type in this crate #1

Open
songjiachao opened this issue Aug 28, 2024 · 0 comments
Open

How to use use specta::Type in this crate #1

songjiachao opened this issue Aug 28, 2024 · 0 comments

Comments

@songjiachao
Copy link

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default, Type)]
pub struct ProxiedRequest {
#[serde(with = "http_serde::method")]
pub method: Method,
#[serde(with = "http_serde::uri")]
pub uri: Uri,
#[serde(with = "http_serde::version")]
pub version: Version,
#[serde(with = "http_serde::header_map")]
pub headers: HeaderMap,
pub body: Option,
pub time: i64,
pub rule: Option,
}

// -> got error

error[E0277]: the trait bound Method: Type is not satisfied
--> /Users/vivo/Desktop/code/fun-family/app/crates/fun-core/src/record.rs:74:17
|
74 | pub method: Method,
| ^^^^^^ the trait Type is not implemented for Method
|
= help: the following other types implement trait Type:
&'a T
&'a [T]
&'a str
()
(T10, T11, T12, T13)
(T11, T12, T13)
(T12, T13)
(T13,)
and 100 others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant