pub enum UseMediaType {
Auto,
Default(MediaType),
}Expand description
Specifies how the content type should be handled when loading the data.
Depending on how the context implementation handles the loading it might already have a content type, but if not it might also need to “sniff” it, which can fail. Nevertheless how any of the aspects are handled in detail depends on the context implementation.
Variants§
Auto
Sniff content type if no content type was given from any other place.
Default(MediaType)
Use this content type if no content type was given from any other place.
As resources are loaded by IRI they could be loaded from any place and this place could be storing the data with the right content type, in which case that content type should be used.
Trait Implementations§
Source§impl Clone for UseMediaType
impl Clone for UseMediaType
Source§fn clone(&self) -> UseMediaType
fn clone(&self) -> UseMediaType
Returns a duplicate 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 UseMediaType
impl Debug for UseMediaType
Source§impl Default for UseMediaType
impl Default for UseMediaType
Source§impl<'de> Deserialize<'de> for UseMediaType
impl<'de> Deserialize<'de> for UseMediaType
Source§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
Auto Trait Implementations§
impl Freeze for UseMediaType
impl RefUnwindSafe for UseMediaType
impl Send for UseMediaType
impl Sync for UseMediaType
impl Unpin for UseMediaType
impl UnwindSafe for UseMediaType
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