[−][src]Enum rocket::http::Method
Representation of HTTP methods.
Variants
GetPutPostDeleteOptionsHeadTraceConnectPatchMethods
impl Method[src]
impl Methodpub fn supports_payload(&self) -> bool[src]
pub fn supports_payload(&self) -> boolReturns true if an HTTP request with the method represented by self
supports a payload.
Example
use rocket::http::Method; assert_eq!(Method::Get.supports_payload(), false); assert_eq!(Method::Post.supports_payload(), true);
pub fn as_str(&self) -> &'static str[src]
pub fn as_str(&self) -> &'static strReturns the string representation of self.
Example
use rocket::http::Method; assert_eq!(Method::Get.as_str(), "GET");
Trait Implementations
impl<'a, 'r> FromRequest<'a, 'r> for Method[src]
impl<'a, 'r> FromRequest<'a, 'r> for Methodtype Error = ()
The associated error to be returned if derivation fails.
fn from_request(request: &'a Request<'r>) -> Outcome<Self, Self::Error>[src]
fn from_request(request: &'a Request<'r>) -> Outcome<Self, Self::Error>impl PartialEq<Method> for Method[src]
impl PartialEq<Method> for Methodfn eq(&self, other: &Method) -> bool[src]
fn eq(&self, other: &Method) -> bool#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl Clone for Method[src]
impl Clone for Methodfn clone(&self) -> Method[src]
fn clone(&self) -> Methodfn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for Method[src]
impl Copy for Methodimpl Eq for Method[src]
impl Eq for Methodimpl Display for Method[src]
impl Display for Methodimpl Debug for Method[src]
impl Debug for Methodimpl FromStr for Method[src]
impl FromStr for Methodtype Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Method, Error>[src]
fn from_str(s: &str) -> Result<Method, Error>impl Hash for Method[src]
impl Hash for MethodAuto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized, [src]
impl<T> ToString for T where
T: Display + ?Sized, impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T> Typeable for T where
T: Any, [src]
impl<T> Typeable for T where
T: Any,