pub struct LayerIndex(pub u32);
Expand description
Represents a layer in a window.
See LAYERS
for more information.
Tuple Fields§
§0: u32
Implementations§
source§impl LayerIndex
impl LayerIndex
sourcepub const TOP_MOST: LayerIndex = _
pub const TOP_MOST: LayerIndex = _
The top-most layer.
Only widgets that are pretending to be a child window should use this layer, including menus, drop-downs, pop-ups and tooltips.
This is the u32::MAX
value.
sourcepub const ADORNER: LayerIndex = _
pub const ADORNER: LayerIndex = _
The layer for adorner display items.
Adorner widgets are related to another widget but not as a visual part of it, examples of adorners are resize handles in a widget visual editor, or an interactive help/guide feature.
This is the TOP_MOST - u16::MAX
value.
sourcepub const DEFAULT: LayerIndex = _
pub const DEFAULT: LayerIndex = _
The default layer, just above the normal window content.
This is the 0
value.
sourcepub fn saturating_add(self, other: impl Into<LayerIndex>) -> Self
pub fn saturating_add(self, other: impl Into<LayerIndex>) -> Self
Compute self + other
saturating at the TOP_MOST
bound instead of overflowing.
sourcepub fn saturating_sub(self, other: impl Into<LayerIndex>) -> Self
pub fn saturating_sub(self, other: impl Into<LayerIndex>) -> Self
Compute self - other
saturating at the DEFAULT
bound instead of overflowing.
Trait Implementations§
source§impl<T: Into<Self>> Add<T> for LayerIndex
impl<T: Into<Self>> Add<T> for LayerIndex
Calls LayerIndex::saturating_add
.
source§impl<T: Into<Self>> AddAssign<T> for LayerIndex
impl<T: Into<Self>> AddAssign<T> for LayerIndex
Calls LayerIndex::saturating_add
.
source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
+=
operation. Read moresource§impl Clone for LayerIndex
impl Clone for LayerIndex
source§fn clone(&self) -> LayerIndex
fn clone(&self) -> LayerIndex
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LayerIndex
impl Debug for LayerIndex
source§impl Default for LayerIndex
impl Default for LayerIndex
source§fn default() -> LayerIndex
fn default() -> LayerIndex
source§impl<'de> Deserialize<'de> for LayerIndex
impl<'de> Deserialize<'de> for LayerIndex
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>,
source§impl Div<Factor> for LayerIndex
impl Div<Factor> for LayerIndex
source§impl DivAssign<Factor> for LayerIndex
impl DivAssign<Factor> for LayerIndex
source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
/=
operation. Read moresource§impl From<u32> for LayerIndex
impl From<u32> for LayerIndex
source§impl FromStr for LayerIndex
impl FromStr for LayerIndex
source§impl IntoVar<LayerIndex> for u32
impl IntoVar<LayerIndex> for u32
source§impl Mul<Factor> for LayerIndex
impl Mul<Factor> for LayerIndex
source§impl MulAssign<Factor> for LayerIndex
impl MulAssign<Factor> for LayerIndex
source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
*=
operation. Read moresource§impl Ord for LayerIndex
impl Ord for LayerIndex
source§fn cmp(&self, other: &LayerIndex) -> Ordering
fn cmp(&self, other: &LayerIndex) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for LayerIndex
impl PartialEq for LayerIndex
source§impl PartialOrd for LayerIndex
impl PartialOrd for LayerIndex
source§impl Serialize for LayerIndex
impl Serialize for LayerIndex
source§impl<T: Into<Self>> Sub<T> for LayerIndex
impl<T: Into<Self>> Sub<T> for LayerIndex
Calls LayerIndex::saturating_sub
.
source§impl<T: Into<Self>> SubAssign<T> for LayerIndex
impl<T: Into<Self>> SubAssign<T> for LayerIndex
Calls LayerIndex::saturating_sub
.
source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
-=
operation. Read moreimpl Copy for LayerIndex
impl Eq for LayerIndex
impl IntoValue<LayerIndex> for u32
impl StructuralPartialEq for LayerIndex
Auto Trait Implementations§
impl Freeze for LayerIndex
impl RefUnwindSafe for LayerIndex
impl Send for LayerIndex
impl Sync for LayerIndex
impl Unpin for LayerIndex
impl UnwindSafe for LayerIndex
Blanket Implementations§
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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