use-layer 0.1.0

Layer and z-order semantics primitives for RustUse UI
Documentation
  • Coverage
  • 19.05%
    4 out of 21 items documented1 out of 12 items with examples
  • Size
  • Source code size: 5.84 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 471.29 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-ui
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-layer

Layer and z-order semantics primitives for RustUse UI.

Purpose

use-layer models common layer roles, numeric layer indices, and simple layer stacks. It provides ordering helpers without binding to CSS, windows, canvases, or a renderer.

Example

use use_layer::{LayerIndex, LayerRole, LayerStack};

let stack = LayerStack::new(vec![LayerRole::Base, LayerRole::Popover, LayerRole::Modal]);

assert!(LayerRole::Modal.sits_above(LayerRole::Popover));
assert!(LayerIndex::new(20) > LayerIndex::new(10));
assert_eq!(stack.top(), Some(LayerRole::Modal));

Main types

  • LayerRole
  • LayerIndex
  • LayerStack

Facade relationship

The use-ui facade exposes this crate as use_ui::layer when the layer or full feature is enabled.