Skip to main content

leptos_classes/
lib.rs

1#![doc = include_str!("../README.md")]
2
3mod class_item;
4mod class_list;
5mod class_name;
6mod classes;
7mod condition;
8mod convert;
9mod into_class;
10
11pub use class_name::{ClassName, InvalidClassName};
12pub use classes::{Classes, ClassesBuilder, MergeStrategy};
13
14/// Compile-time assertions that the public types stay `Send + Sync`. `Classes` is intended to
15/// flow through Leptos component props, which require both bounds. If a future change to any
16/// internal field weakens that, this `const _` will fail to compile and surface the regression at
17/// the crate boundary instead of at a downstream consumer.
18const _: () = {
19    const fn assert_send_sync<T: Send + Sync>() {}
20    assert_send_sync::<Classes>();
21    assert_send_sync::<ClassesBuilder>();
22    assert_send_sync::<ClassName>();
23    assert_send_sync::<InvalidClassName>();
24    assert_send_sync::<MergeStrategy>();
25};