get_neighbor_slot_refs

Function get_neighbor_slot_refs 

Source
pub(crate) fn get_neighbor_slot_refs<T, F>(
    idx: usize,
    fields: &[T],
    packing: &Ident,
    get_name: F,
) -> (Option<TokenStream>, Option<TokenStream>)
where F: Fn(&T) -> &Ident,
Expand description

Helper to compute prev and next slot constant references for a field at a given index.

Generic over the field type - uses a closure to extract the field name.