use-layout 0.1.0

Platform-neutral layout vocabulary primitives for RustUse UI
Documentation
  • Coverage
  • 19.44%
    7 out of 36 items documented1 out of 12 items with examples
  • Size
  • Source code size: 5.89 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 707.92 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s 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-layout

Platform-neutral layout vocabulary primitives for RustUse UI.

Purpose

use-layout describes layout semantics such as direction, axis, alignment, justification, placement, and flow. It does not implement a layout engine.

Example

use use_layout::{Alignment, Axis, Direction, Flow, Placement};

assert_eq!(Direction::Vertical.axis(), Axis::Block);
assert_eq!(Axis::Inline.direction(), Direction::Horizontal);
assert!(Alignment::Stretch.is_stretched());
assert!(Placement::Top.is_edge());
assert_eq!(Flow::Row.direction(), Some(Direction::Horizontal));

Main types

  • Direction
  • Alignment
  • Justification
  • Placement
  • Flow
  • Axis

Facade relationship

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