pub enum ContentType {
Json,
TextXml,
ApplicationXml,
UrlEncoded,
}
Expand description
Suppling Fetch with a ContentType will set the content-type
header as well as change how the data is serialized to the server
Variants§
Json
Serialize as application/json
TextXml
Serialize as text/xml
ApplicationXml
Serialize as application/xml
UrlEncoded
Serialize as application/x-www-form-urlencoded
Trait Implementations§
Source§impl Clone for ContentType
impl Clone for ContentType
Source§fn clone(&self) -> ContentType
fn clone(&self) -> ContentType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ContentType
impl Debug for ContentType
Source§impl Default for ContentType
impl Default for ContentType
Source§impl Display for ContentType
impl Display for ContentType
Source§impl From<ContentType> for String
impl From<ContentType> for String
Source§fn from(content_type: ContentType) -> Self
fn from(content_type: ContentType) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ContentType
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnwindSafe for ContentType
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