#[derive(KeyExtract)]
{
// Attributes available to this derive:
#[key_extract]
}
Expand description
Derive macro for KeyExtract trait.
Generates an implementation of KeyExtract that creates key parts from struct fields.
§Attributes
#[key_extract(name = "...")]- Override the key part name (default: field name)#[key_extract(skip)]- Skip this field in key generation
§Example
ⓘ
use hitbox_fn::KeyExtract;
#[derive(KeyExtract)]
struct UserRequest {
user_id: u64,
#[key_extract(skip)]
password: String,
}