конечный сахар будет примерно так выглядить:
#[derive(RestRedirect)]
#[rest(url = "/{thread_id}/posts", redirect = "CreatePost", method = "post", authorization="required")]
struct CreatePost {
#[rest(param = "thread_id")]
pub thread: u32,
pub comment: String
}