`#[derive(Debug, Deserialize, Serialize)]
struct RangeParameters {
start: usize,
end: usize
}
use rand:: Rng;
async fn handler_random_number_generator(Query(params): Query<RangeParameters>) -> impl IntoResponse{
let random_number = rand::thread_rng().gen_range(params.start..params.end);
Html(include_str!("../index.html"))
}
I want to pass the random_number in the index.html file. How it is possible. Please help and pardon me for my English.
I want to pass the random_number in the index.html file. where in index.html exists a place holder. In html place holder I want to pass a variable, is this possible? please help.
I have achived this by using askama create
Here is my code