Skip to main content

CacheableRequest

Derive Macro CacheableRequest 

Source
#[derive(CacheableRequest)]
{
    // Attributes available to this derive:
    #[cacheable_request]
}
Expand description

Derive macro for CacheableRequest trait.

Generates an implementation of CacheableRequest with standard cache policy logic. The type can then participate in the hitbox caching pipeline.

§Example

use hitbox_derive::CacheableRequest;

#[derive(CacheableRequest)]
struct SearchRequest {
    query: String,
    page: u32,
}