[−][src]Enum rocket_http::Method
Representation of HTTP methods.
Variants
Get
Put
Post
Delete
Options
Head
Trace
Connect
Patch
Methods
impl Method
[src]
pub fn supports_payload(self) -> bool
[src]
Returns true
if an HTTP request with the method represented by self
always supports a payload.
The following methods always support payloads:
PUT
,POST
,DELETE
,PATCH
The following methods do not always support payloads:
GET
,HEAD
,CONNECT
,TRACE
,OPTIONS
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]
Returns the string representation of self
.
Example
use rocket::http::Method; assert_eq!(Method::Get.as_str(), "GET");
Trait Implementations
impl Eq for Method
[src]
impl PartialEq<Method> for Method
[src]
fn eq(&self, other: &Method) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Copy for Method
[src]
impl Clone for Method
[src]
fn clone(&self) -> Method
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Method
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Method
[src]
impl Debug for Method
[src]
impl FromStr for Method
[src]
Auto Trait Implementations
impl Sync for Method
impl Send for Method
impl Unpin for Method
impl RefUnwindSafe for Method
impl UnwindSafe for Method
Blanket Implementations
impl<T> IntoCollection<T> for T
[src]
ⓘImportant traits for SmallVec<A>fn into_collection<A>(Self) -> SmallVec<A> where
A: Array<Item = T>,
[src]
ⓘImportant traits for SmallVec<A>
A: Array<Item = T>,
ⓘImportant traits for SmallVec<A>fn mapped<U, F, A>(Self, F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
[src]
ⓘImportant traits for SmallVec<A>
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
[src]
I: Input,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Typeable for T where
T: Any,
T: Any,