Struct zng::layer::LayerIndex
source · 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>) -> LayerIndex
pub fn saturating_add(self, other: impl Into<LayerIndex>) -> LayerIndex
Compute self + other
saturating at the TOP_MOST
bound instead of overflowing.
sourcepub fn saturating_sub(self, other: impl Into<LayerIndex>) -> LayerIndex
pub fn saturating_sub(self, other: impl Into<LayerIndex>) -> LayerIndex
Compute self - other
saturating at the DEFAULT
bound instead of overflowing.
Trait Implementations§
source§impl<T> Add<T> for LayerIndexwhere
T: Into<LayerIndex>,
impl<T> Add<T> for LayerIndexwhere
T: Into<LayerIndex>,
Calls LayerIndex::saturating_add
.
source§impl<T> AddAssign<T> for LayerIndexwhere
T: Into<LayerIndex>,
impl<T> AddAssign<T> for LayerIndexwhere
T: Into<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<LayerIndex, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<LayerIndex, <D as Deserializer<'de>>::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§fn from(index: u32) -> LayerIndex
fn from(index: u32) -> LayerIndex
source§impl FromStr for LayerIndex
impl FromStr for LayerIndex
source§impl IntoVar<LayerIndex> for u32
impl IntoVar<LayerIndex> for u32
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§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§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Sub<T> for LayerIndexwhere
T: Into<LayerIndex>,
impl<T> Sub<T> for LayerIndexwhere
T: Into<LayerIndex>,
Calls LayerIndex::saturating_sub
.
source§impl<T> SubAssign<T> for LayerIndexwhere
T: Into<LayerIndex>,
impl<T> SubAssign<T> for LayerIndexwhere
T: Into<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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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.source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§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> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.