Function warp::filters::cookie::optional

source ·
pub fn optional(
    name: &'static str
) -> impl Filter<Extract = (Option<String>,), Error = Never> + Copy
Expand description

Creates a Filter that looks for an optional cookie by name.

If found, extracts the value of the cookie, otherwise continues the request, extracting None.