typeslice 0.2.5

type-level slices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(dead_code)]
#![cfg(feature = "macros")]

use static_assertions::assert_type_eq_all;

type Empty = typeslice::from_str!();
type Empty2 = typeslice::from_str!("");
type Empty3 = typeslice::char![];
assert_type_eq_all!(Empty, Empty2, Empty3);

type Hello = typeslice::from_str!("hello");
type Hello2 = typeslice::char!['h', 'e', 'l', 'l', 'o'];
assert_type_eq_all!(Hello, Hello2);

type BEmpty = typeslice::from_bytes!();
type BEmpty2 = typeslice::from_bytes!(b"");
type BEmpty3 = typeslice::u8![];
assert_type_eq_all!(BEmpty, BEmpty2, BEmpty3);