C Container Collection (CCC)
Loading...
Searching...
No Matches
CCC_Key_arguments Struct Reference

A read only reference to a key type matching the key field type used for hash containers. More...

#include <types.h>

Detailed Description

A read only reference to a key type matching the key field type used for hash containers.

A reference to any context data is also provided. This the struct one can use to hash their values with their hash function.

The pointers are const to bind the key closely with its context, if context is provided. This discourages the user from accidentally swapping one field without changing the other. It also encourages users to opt for inline compound literal construction passing or accurate variable naming when creating callback arguments for better code readability.

Data Fields

void const *const key
 
void *const context
 

Field Documentation

◆ context

void* const CCC_Key_arguments::context

A reference to context for this action on a key.

◆ key

void const* const CCC_Key_arguments::key

A reference to the same type used for keys in the container.


The documentation for this struct was generated from the following file: