pub enum HttpField<'a> {
Param(&'a str),
QueryParam(&'a str),
Header(&'a str),
Cookie(&'a str),
}Expand description
Enum to indicate on which HTTP field you want to make validations
Variants§
Param(&'a str)
To validate a path parameter. Example in URL /test/:name you can use HttpField::Param("name")
QueryParam(&'a str)
To validate a query parameter. Example in URL /test?name=test you can use HttpField::QueryParam("name")
Header(&'a str)
To validate a header. Example HttpField::Header("X-My-Custom-Header")
Cookie(&'a str)
To validate a cookie. Example HttpField::Cookie("session")
Trait Implementations§
impl<'a> Eq for HttpField<'a>
impl<'a> StructuralPartialEq for HttpField<'a>
Auto Trait Implementations§
impl<'a> Freeze for HttpField<'a>
impl<'a> RefUnwindSafe for HttpField<'a>
impl<'a> Send for HttpField<'a>
impl<'a> Sync for HttpField<'a>
impl<'a> Unpin for HttpField<'a>
impl<'a> UnwindSafe for HttpField<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more