Skip to content

How to provide single query string param without HashMap<_,_>? #3227

Answered by jplatte
Kimishu asked this question in Q&A
Discussion options

You must be logged in to vote

If your entire query string is just a UUID, you can use RawQuery and parse it inside your handler function, or make your own extractor.

If you want to parse id=<uuid>, create a struct like

#[derive(Deserialize)]
struct TestParams {
    id: Uuid,
}

and use Query<TestParams>.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Kimishu
Comment options

@Turbo87
Comment options

Turbo87 Feb 18, 2025
Collaborator

@Kimishu
Comment options

Comment options

You must be logged in to vote
1 reply
@Kimishu
Comment options

Answer selected by Kimishu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants