Skip to main content

alignment

Macro alignment 

Source
macro_rules! alignment {
    ( $x:tt , $y:tt ) => { ... };
}
Expand description

Helper macro that creates an Alignment value.

ยงExamples

use cotis_defaults::alignment;
use cotis_defaults::element_configs::style::types::{LayoutAlignmentX, LayoutAlignmentY};

let alignment = alignment!(Left, Top);
assert_eq!(alignment.x, LayoutAlignmentX::Left);
assert_eq!(alignment.y, LayoutAlignmentY::Top);