pub enum SizeFeature {
Plain(SizeFeaturePlain),
Boolean(SizeFeatureBoolean),
Range(SizeFeatureRange),
RangeInterval(SizeFeatureRangeInterval),
}
Variants§
Plain(SizeFeaturePlain)
Boolean(SizeFeatureBoolean)
Range(SizeFeatureRange)
RangeInterval(SizeFeatureRangeInterval)
Implementations§
Source§impl SizeFeature
impl SizeFeature
Sourcepub fn as_plain(&self) -> Option<&SizeFeaturePlain>
pub fn as_plain(&self) -> Option<&SizeFeaturePlain>
Returns Some
if self
is a reference of variant Plain
, and None
otherwise.
Sourcepub fn as_mut_plain(&mut self) -> Option<&mut SizeFeaturePlain>
pub fn as_mut_plain(&mut self) -> Option<&mut SizeFeaturePlain>
Returns Some
if self
is a mutable reference of variant Plain
, and None
otherwise.
Sourcepub fn expect_plain(self) -> SizeFeaturePlainwhere
Self: Debug,
pub fn expect_plain(self) -> SizeFeaturePlainwhere
Self: Debug,
Sourcepub fn plain(self) -> Option<SizeFeaturePlain>
pub fn plain(self) -> Option<SizeFeaturePlain>
Returns Some
if self
is of variant Plain
, and None
otherwise.
Sourcepub const fn is_boolean(&self) -> bool
pub const fn is_boolean(&self) -> bool
Returns true
if self
is of variant Boolean
.
Sourcepub fn as_boolean(&self) -> Option<&SizeFeatureBoolean>
pub fn as_boolean(&self) -> Option<&SizeFeatureBoolean>
Returns Some
if self
is a reference of variant Boolean
, and None
otherwise.
Sourcepub fn as_mut_boolean(&mut self) -> Option<&mut SizeFeatureBoolean>
pub fn as_mut_boolean(&mut self) -> Option<&mut SizeFeatureBoolean>
Returns Some
if self
is a mutable reference of variant Boolean
, and None
otherwise.
Sourcepub fn expect_boolean(self) -> SizeFeatureBooleanwhere
Self: Debug,
pub fn expect_boolean(self) -> SizeFeatureBooleanwhere
Self: Debug,
Sourcepub fn boolean(self) -> Option<SizeFeatureBoolean>
pub fn boolean(self) -> Option<SizeFeatureBoolean>
Returns Some
if self
is of variant Boolean
, and None
otherwise.
Sourcepub fn as_range(&self) -> Option<&SizeFeatureRange>
pub fn as_range(&self) -> Option<&SizeFeatureRange>
Returns Some
if self
is a reference of variant Range
, and None
otherwise.
Sourcepub fn as_mut_range(&mut self) -> Option<&mut SizeFeatureRange>
pub fn as_mut_range(&mut self) -> Option<&mut SizeFeatureRange>
Returns Some
if self
is a mutable reference of variant Range
, and None
otherwise.
Sourcepub fn expect_range(self) -> SizeFeatureRangewhere
Self: Debug,
pub fn expect_range(self) -> SizeFeatureRangewhere
Self: Debug,
Sourcepub fn range(self) -> Option<SizeFeatureRange>
pub fn range(self) -> Option<SizeFeatureRange>
Returns Some
if self
is of variant Range
, and None
otherwise.
Sourcepub const fn is_range_interval(&self) -> bool
pub const fn is_range_interval(&self) -> bool
Returns true
if self
is of variant RangeInterval
.
Sourcepub fn as_range_interval(&self) -> Option<&SizeFeatureRangeInterval>
pub fn as_range_interval(&self) -> Option<&SizeFeatureRangeInterval>
Returns Some
if self
is a reference of variant RangeInterval
, and None
otherwise.
Sourcepub fn as_mut_range_interval(&mut self) -> Option<&mut SizeFeatureRangeInterval>
pub fn as_mut_range_interval(&mut self) -> Option<&mut SizeFeatureRangeInterval>
Returns Some
if self
is a mutable reference of variant RangeInterval
, and None
otherwise.
Sourcepub fn expect_range_interval(self) -> SizeFeatureRangeIntervalwhere
Self: Debug,
pub fn expect_range_interval(self) -> SizeFeatureRangeIntervalwhere
Self: Debug,
Unwraps the value, yielding the content of RangeInterval
.
§Panics
Panics if the value is not RangeInterval
, with a panic message including the content of self
.
Sourcepub fn range_interval(self) -> Option<SizeFeatureRangeInterval>
pub fn range_interval(self) -> Option<SizeFeatureRangeInterval>
Returns Some
if self
is of variant RangeInterval
, and None
otherwise.
Trait Implementations§
Source§impl Clone for SizeFeature
impl Clone for SizeFeature
Source§fn clone(&self) -> SizeFeature
fn clone(&self) -> SizeFeature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SizeFeature
impl Debug for SizeFeature
Source§impl EqIgnoreSpan for SizeFeature
impl EqIgnoreSpan for SizeFeature
fn eq_ignore_span(&self, other: &Self) -> bool
Source§impl From<SizeFeature> for QueryInParens
impl From<SizeFeature> for QueryInParens
Source§fn from(v: SizeFeature) -> Self
fn from(v: SizeFeature) -> Self
Source§impl From<SizeFeatureBoolean> for SizeFeature
impl From<SizeFeatureBoolean> for SizeFeature
Source§fn from(v: SizeFeatureBoolean) -> Self
fn from(v: SizeFeatureBoolean) -> Self
Source§impl From<SizeFeaturePlain> for SizeFeature
impl From<SizeFeaturePlain> for SizeFeature
Source§fn from(v: SizeFeaturePlain) -> Self
fn from(v: SizeFeaturePlain) -> Self
Source§impl From<SizeFeatureRange> for SizeFeature
impl From<SizeFeatureRange> for SizeFeature
Source§fn from(v: SizeFeatureRange) -> Self
fn from(v: SizeFeatureRange) -> Self
Source§impl From<SizeFeatureRangeInterval> for SizeFeature
impl From<SizeFeatureRangeInterval> for SizeFeature
Source§fn from(v: SizeFeatureRangeInterval) -> Self
fn from(v: SizeFeatureRangeInterval) -> Self
Source§impl Hash for SizeFeature
impl Hash for SizeFeature
Source§impl PartialEq for SizeFeature
impl PartialEq for SizeFeature
Source§impl Spanned for SizeFeature
impl Spanned for SizeFeature
impl Eq for SizeFeature
impl StructuralPartialEq for SizeFeature
Auto Trait Implementations§
impl Freeze for SizeFeature
impl RefUnwindSafe for SizeFeature
impl Send for SizeFeature
impl Sync for SizeFeature
impl Unpin for SizeFeature
impl UnwindSafe for SizeFeature
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§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