#linked-list #context #const #tiny

const_list

A tiny linked list usable in const contexts

1 unstable release

0.1.0 Aug 28, 2023

#104 in #linked-list

Download history 10/week @ 2024-11-13 26/week @ 2024-11-20 37/week @ 2024-11-27 44/week @ 2024-12-04 48/week @ 2024-12-11 20/week @ 2024-12-18 13/week @ 2025-01-01 14/week @ 2025-01-08 16/week @ 2025-01-15 23/week @ 2025-01-22 7/week @ 2025-01-29 32/week @ 2025-02-05 33/week @ 2025-02-12 19/week @ 2025-02-19 21/week @ 2025-02-26

107 downloads per month
Used in 11 crates (4 directly)

MIT/Apache

5KB
79 lines

const_list

Crates.io Docs.rs Unsafe Forbidden

const_list provides a minimal linked-list which may be used at compile-time. For example:

const MY_LIST: ConstList<'static, i32> = ConstList::new()
    .push(2)
    .push(4)
    .push(8);

assert_eq!(8, MY_LIST.pop().0.unwrap());

lib.rs:

const_list provides a minimal linked-list which may be used at compile-time. For example:

const MY_LIST: ConstList<'static, i32> = ConstList::new()
    .push(2)
    .push(4)
    .push(8);

assert_eq!(8, *MY_LIST.pop().0.unwrap());

No runtime deps