Struct pact_models::content_types::ContentType [−][src]
pub struct ContentType {
pub main_type: String,
pub sub_type: String,
pub attributes: BTreeMap<String, String>,
pub suffix: Option<String>,
}
Expand description
Content type of a body
Fields
main_type: String
Main content type
sub_type: String
Sub content type
attributes: BTreeMap<String, String>
Content type attributes
suffix: Option<String>
Suffix
Implementations
Parses a string into a ContentType
If it is a XML type (not including ones with suffixes like atom+xml)
Returns the base type with no attributes or suffix
If the content type is the default type
Equals, ignoring attributes if not present on self
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnwindSafe for ContentType
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more