They are described here and look like something that specifies properties that a request needs to have so that some function will trigger. The name Filter makes sense for that, a bit like a coffee filter it only lets certain requests through.
Then they are described here as something that also does transformations. I suppose I can imagine it to be something like a band-pass filter in digital signal processing and get behind that nomenclature as well.
But then this example goes ahead and turns a vector of objects into a filter and now I am really lost. What the hell is going on here
// Turn our "state", our db, into a Filter so we can combine it // easily with others... let db = Arc::new(Mutex::new(Vec::<Todo>::new())); let db = warp::any().map(move || db.clone());
// `GET /todos` let list = warp::get2() .and(todos_index) .and(db.clone()) .map(list_todos);