如何实现一个Option的Query参数提取器? #1195
-
#[derive(Debug, Deserialize, Extractible, ToSchema)]
pub struct PageRequest<T> {
/// 页码
#[serde(default = "default_page")]
pub page: u64,
/// 每页大小
#[serde(default = "default_limit")]
pub limit: u64,
/// 查询条件
#[serde(flatten)]
pub query: T,
} 加上T: DeserializeOwned 也还是一样 |
Beta Was this translation helpful? Give feedback.
Answered by
chrislearn
Sep 2, 2025
Replies: 1 comment
-
你用一下 github 上的 main 分支,现在应该能正常了。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
luoffei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你用一下 github 上的 main 分支,现在应该能正常了。