#linked-list #context #const #tiny

const_list

A tiny linked list usable in const contexts

1 unstable release

0.1.0 Aug 28, 2023

#75 in #linked-list

Download history 10/week @ 2024-02-12 17/week @ 2024-02-19 49/week @ 2024-02-26 10/week @ 2024-03-04 24/week @ 2024-03-11 15/week @ 2024-03-18 22/week @ 2024-03-25 37/week @ 2024-04-01 3/week @ 2024-04-08 4/week @ 2024-04-15

68 downloads per month
Used in 4 crates (2 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