# actix_web::pred - Rust
API documentation for the Rust `pred` mod in crate `actix_web`.
Keywords: rust, rustlang, rust-lang, pred

# [−] [src] Module actix_web::pred

Route match predicates

## Structs

AllPredicate | Matches if all of supplied predicate matches.
AnyPredicate | Matches if any of supplied predicate matches.

## Traits

Predicate | Trait defines resource route predicate. Predicate can modify request object. It is also possible to to store extra attributes on request by using `Extensions` container, Extensions container available via `HttpRequest::extensions()` method.

## Functions

All | Return predicate that matches if all of supplied predicate matches.
Any | Return predicate that matches if any of supplied predicate matches.
Connect | Predicate to match CONNECT http method
Delete | Predicate to match DELETE http method
Get | Predicate to match GET http method
Head | Predicate to match HEAD http method
Header | Return predicate that matches if request contains specified header and value.
Host | Return predicate that matches if request contains specified Host name.
Method | Predicate to match specified http method
Not | Return predicate that matches if supplied predicate does not match.
Options | Predicate to match OPTIONS http method
Patch | Predicate to match PATCH http method
Post | Predicate to match POST http method
Put | Predicate to match PUT http method
Trace | Predicate to match TRACE http method

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)