Struct pact_models::content_types::JSON
source · pub struct JSON { /* private fields */ }
Expand description
JSON Content Type
Methods from Deref<Target = ContentType>§
sourcepub fn is_strict_xml(&self) -> bool
pub fn is_strict_xml(&self) -> bool
If it is a XML type (not including ones with suffixes like atom+xml)
sourcepub fn base_type(&self) -> ContentType
pub fn base_type(&self) -> ContentType
Returns the base type with no attributes or suffix
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
If the content type is the default type
sourcepub fn is_equivalent_to(&self, other: &ContentType) -> bool
pub fn is_equivalent_to(&self, other: &ContentType) -> bool
Equals, ignoring attributes if not present on self
Trait Implementations§
source§impl Deref for JSON
impl Deref for JSON
§type Target = ContentType
type Target = ContentType
The resulting type after dereferencing.
source§fn deref(&self) -> &ContentType
fn deref(&self) -> &ContentType
Dereferences the value.
impl LazyStatic for JSON
Auto Trait Implementations§
impl RefUnwindSafe for JSON
impl Send for JSON
impl Sync for JSON
impl Unpin for JSON
impl UnwindSafe for JSON
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