pub struct MediaTypeSelector {
pub main: Selector<MediaTypeSegment>,
pub subtype: Selector<MediaTypeSegment>,
}
Expand description
MediaType selector.
Either of the segments can be Any. However, if main
is Any,
subtype
must also be Any. Use Self::is_valid to check for this.
Fields§
§main: Selector<MediaTypeSegment>
Main segment.
subtype: Selector<MediaTypeSegment>
Subtype segment.
Implementations§
Source§impl MediaTypeSelector
impl MediaTypeSelector
Sourcepub const fn new(
main: Selector<MediaTypeSegment>,
subtype: Selector<MediaTypeSegment>,
) -> Self
pub const fn new( main: Selector<MediaTypeSegment>, subtype: Selector<MediaTypeSegment>, ) -> Self
Constructor.
Sourcepub const fn new_fostered(main: &'static str, subtype: &'static str) -> Self
pub const fn new_fostered(main: &'static str, subtype: &'static str) -> Self
Constructor.
Trait Implementations§
Source§impl CacheWeight for MediaTypeSelector
impl CacheWeight for MediaTypeSelector
Source§fn cache_weight(&self) -> usize
fn cache_weight(&self) -> usize
Cache weight as a byte count. Read more
Source§impl Clone for MediaTypeSelector
impl Clone for MediaTypeSelector
Source§fn clone(&self) -> MediaTypeSelector
fn clone(&self) -> MediaTypeSelector
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 MediaTypeSelector
impl Debug for MediaTypeSelector
Source§impl Display for MediaTypeSelector
impl Display for MediaTypeSelector
Source§impl From<MediaType> for MediaTypeSelector
impl From<MediaType> for MediaTypeSelector
Source§impl FromStr for MediaTypeSelector
impl FromStr for MediaTypeSelector
Source§impl Hash for MediaTypeSelector
impl Hash for MediaTypeSelector
Source§impl IntoOwned for MediaTypeSelector
impl IntoOwned for MediaTypeSelector
Source§fn into_owned(self) -> Self
fn into_owned(self) -> Self
Into owned.
Source§impl IsSpecific for MediaTypeSelector
impl IsSpecific for MediaTypeSelector
Source§fn is_specific(&self) -> bool
fn is_specific(&self) -> bool
True if specific.
Source§impl PartialEq<MediaType> for MediaTypeSelector
impl PartialEq<MediaType> for MediaTypeSelector
Source§impl PartialEq for MediaTypeSelector
impl PartialEq for MediaTypeSelector
impl Eq for MediaTypeSelector
impl StructuralPartialEq for MediaTypeSelector
Auto Trait Implementations§
impl Freeze for MediaTypeSelector
impl RefUnwindSafe for MediaTypeSelector
impl Send for MediaTypeSelector
impl Sync for MediaTypeSelector
impl Unpin for MediaTypeSelector
impl UnwindSafe for MediaTypeSelector
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.