gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 684HTML 640Markdown 12TOML 62290 Definiciones

⎇ a26a7d4db504ae855ff17373114a23981a726f5e src/result.rs Rust · 27 líneas · 560 B Historia Quién tocó qué crudo

Rebase & format 72750c402 · Emil Sjölander ·

1#[cfg(not(feature = "std"))]
2use alloc::vec::Vec;
3
4use core::any::Any;
5
6use crate::algo::ComputeResult;
7use crate::geometry::{Point, Size};
8use crate::number::Number;
9
10pub type Result<T> = core::result::Result<T, Box<Any>>;
11
12#[derive(Debug, Clone)]
13pub struct Layout {
14    pub(crate) order: u32,
15    pub size: Size<f32>,
16    pub location: Point<f32>,
17    pub children: Vec<Layout>,
18}
19
20#[derive(Debug, Clone)]
21pub struct Cache {
22    pub node_size: Size<Number>,
23    pub parent_size: Size<Number>,
24    pub perform_layout: bool,
25
26    pub result: ComputeResult,
27}