1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
pub use redis;
pub use ;
pub use HashModel;
pub use JsonModel;
pub use RedisModel;
pub use StreamModel;
/// Derive procedural macro that automatically generate implementation for
///
/// [`RedisTransportValue`](), which requires implementation of the following:
///
/// - [`ToRedisArgs`](redis::ToRedisArgs),
/// - [`FromRedisValue`](redis::FromRedisValue)
///
/// # Example
///
/// ```
/// #[derive(redis_om::RedisTransportValue)]
/// struct Test {
/// #[redis(primary_key)] // required if no `id` field exists
/// field_one: String,
/// field_two: i32,
/// field_three: Vec<u8>,
/// }
/// ```
///
/// # Attributes
///
/// ## `rename_all = "some_case"`
///
/// This attribute sets the default casing to be used for field names when generating Redis command arguments.
/// Possible values are:
///
/// - `"snake_case"`: field names will be converted to `snake_case`
/// - `"kebab-case"`: field names will be converted to `kebab-case`
/// - `"camelCase"`: field names will be converted to `camelCase`
/// - `"PascalCase"`: field names will be converted to `PascalCase`
///
/// This attribute can be overridden for individual fields using the `rename` attribute.
///
/// ## `rename = "some_field"`
///
/// This attribute sets the Redis key name to be used for a field when generating Redis command arguments.
/// This attribute takes precedence over the `rename_all` attribute.
///
/// # Restrictions
///
/// - Enums with fields are not supported
/// - Generics are not supported
/// - Public fields are required
/// - Fields with types that do not implement `ToRedisArgs` and `FromRedisValue` are not supported
pub use RedisTransportValue;
pub use HashModel;
pub use *;
pub use RedisModel;
pub use RedisSearchModel;
pub use StreamModel;
pub use async_trait;