leptos_struct_table/uuid.rs
1//! Support for [uuid::Uuid] type.
2use crate::*;
3use ::uuid::Uuid;
4use leptos::prelude::*;
5
6/// Implementation for [`Uuid`] to work with the [`TableRow`] derive and the [`DefaultTableCellRenderer`]
7/// ```
8/// # use leptos_struct_table::*;
9/// # use leptos::prelude::*;
10/// # use uuid::Uuid;
11/// #[derive(TableRow, Clone)]
12/// #[table]
13/// struct SomeStruct {
14/// my_field: Uuid
15/// }
16/// ```
17impl CellValue<Uuid> for Uuid {
18 type RenderOptions = ();
19
20 fn render_value(self, _options: Self::RenderOptions) -> impl IntoView {
21 self.to_string()
22 }
23}