pub enum MediaConditionWithoutOrType {
Not(MediaNot),
And(MediaAnd),
MediaInParens(MediaInParens),
}
Variants§
Implementations§
source§impl MediaConditionWithoutOrType
impl MediaConditionWithoutOrType
sourcepub fn as_not(&self) -> Option<&MediaNot>
pub fn as_not(&self) -> Option<&MediaNot>
Returns Some
if self
is a reference of variant Not
, and None
otherwise.
sourcepub fn as_mut_not(&mut self) -> Option<&mut MediaNot>
pub fn as_mut_not(&mut self) -> Option<&mut MediaNot>
Returns Some
if self
is a mutable reference of variant Not
, and None
otherwise.
sourcepub fn expect_not(self) -> MediaNotwhere
Self: Debug,
pub fn expect_not(self) -> MediaNotwhere
Self: Debug,
sourcepub fn not(self) -> Option<MediaNot>
pub fn not(self) -> Option<MediaNot>
Returns Some
if self
is of variant Not
, and None
otherwise.
sourcepub fn as_and(&self) -> Option<&MediaAnd>
pub fn as_and(&self) -> Option<&MediaAnd>
Returns Some
if self
is a reference of variant And
, and None
otherwise.
sourcepub fn as_mut_and(&mut self) -> Option<&mut MediaAnd>
pub fn as_mut_and(&mut self) -> Option<&mut MediaAnd>
Returns Some
if self
is a mutable reference of variant And
, and None
otherwise.
sourcepub fn expect_and(self) -> MediaAndwhere
Self: Debug,
pub fn expect_and(self) -> MediaAndwhere
Self: Debug,
sourcepub fn and(self) -> Option<MediaAnd>
pub fn and(self) -> Option<MediaAnd>
Returns Some
if self
is of variant And
, and None
otherwise.
sourcepub const fn is_media_in_parens(&self) -> bool
pub const fn is_media_in_parens(&self) -> bool
Returns true
if self
is of variant MediaInParens
.
sourcepub fn as_media_in_parens(&self) -> Option<&MediaInParens>
pub fn as_media_in_parens(&self) -> Option<&MediaInParens>
Returns Some
if self
is a reference of variant MediaInParens
, and None
otherwise.
sourcepub fn as_mut_media_in_parens(&mut self) -> Option<&mut MediaInParens>
pub fn as_mut_media_in_parens(&mut self) -> Option<&mut MediaInParens>
Returns Some
if self
is a mutable reference of variant MediaInParens
, and None
otherwise.
sourcepub fn expect_media_in_parens(self) -> MediaInParenswhere
Self: Debug,
pub fn expect_media_in_parens(self) -> MediaInParenswhere
Self: Debug,
Unwraps the value, yielding the content of MediaInParens
.
§Panics
Panics if the value is not MediaInParens
, with a panic message including the content of self
.
sourcepub fn media_in_parens(self) -> Option<MediaInParens>
pub fn media_in_parens(self) -> Option<MediaInParens>
Returns Some
if self
is of variant MediaInParens
, and None
otherwise.
Trait Implementations§
source§impl Clone for MediaConditionWithoutOrType
impl Clone for MediaConditionWithoutOrType
source§fn clone(&self) -> MediaConditionWithoutOrType
fn clone(&self) -> MediaConditionWithoutOrType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MediaConditionWithoutOrType
impl Debug for MediaConditionWithoutOrType
source§impl EqIgnoreSpan for MediaConditionWithoutOrType
impl EqIgnoreSpan for MediaConditionWithoutOrType
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<MediaAnd> for MediaConditionWithoutOrType
impl From<MediaAnd> for MediaConditionWithoutOrType
source§impl From<MediaInParens> for MediaConditionWithoutOrType
impl From<MediaInParens> for MediaConditionWithoutOrType
source§fn from(v: MediaInParens) -> Self
fn from(v: MediaInParens) -> Self
source§impl From<MediaNot> for MediaConditionWithoutOrType
impl From<MediaNot> for MediaConditionWithoutOrType
source§impl Hash for MediaConditionWithoutOrType
impl Hash for MediaConditionWithoutOrType
impl Eq for MediaConditionWithoutOrType
impl StructuralPartialEq for MediaConditionWithoutOrType
Auto Trait Implementations§
impl Freeze for MediaConditionWithoutOrType
impl RefUnwindSafe for MediaConditionWithoutOrType
impl Send for MediaConditionWithoutOrType
impl Sync for MediaConditionWithoutOrType
impl Unpin for MediaConditionWithoutOrType
impl UnwindSafe for MediaConditionWithoutOrType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more