macro_rules! generate_sync_aslock {
    ( $Table:ident
        // Table might be a template type.
        $(<
            // Any number of inner types.
            $( $Inner:tt ),*
        >)?
    ) => { ... };
}
Expand description

These macros automatically generates an easy to use interface for interacting with an ActiveStandby data structure. Note that this is done for each underlying table, as opposed to an RwLock which is generic over all underlying types.

Using the plain AsLockHandle/AsLock requires users to call to the update_tables interface as oppossed to an RwLock which lets users directly mutate their desired table. Using these macros allows client libraries to create interfaces (per container), which wrap the calls to update_tables and allows for a UI much like a plain RwLock.

This macro is valid for templated types. The macro can’t handle paths, so you can’t pass ‘std::collections::HashMap’. In such a case just put the use statement in the module.

Generates a sync::AsLock for the type passed in.