I'd like to build a custom path, then download a file at that path. Eg,
warp::path!("files" / u32)
.map(|fileId| {
format!("{}.txt", *FILES_PATH, fileId)
})
.and(warp::fs::file)
But I get an error like:
the trait bound 'fn(_) ->
impl warp::filter::FilterClone {
warp::filters::fs::file::<_>
}: warp::filter::FilterBase' is not satisfied
Am I missing an easy way that this can be done?