pub const fn gen(mut bytes: &[u8]) -> Table {
        let mut arr = [0; 256];
        while let [cur, rem @ ..] = bytes {
            assert!(cur.is_ascii() && *cur != b'%', "non-ASCII or %");
            arr[*cur as usize] = 1;
            bytes = rem;
        }
        Table {
            arr,
            allows_enc: false,
        }
    }
/// Generates a table that only allows the given unencoded bytes.
///
/// # Panics
///
/// Panics if any of the bytes is not ASCII or is `%`.
Generates a table that only allows the given unencoded bytes.
Generates a table that only allows the given unencoded bytes .
pub const fn gen(mut bytes: &[u8]) -> Table {
        let mut arr = [0; 256];
        while let [cur, rem @ ..] = bytes {
            assert!(cur.is_ascii() && *cur != b'%', "non-ASCII or %");
            arr[*cur as usize] = 1;
            bytes = rem;
        }
        Table {
            arr,
            allows_enc: false,
        }
    }
pub const fn gen ( mut bytes : & [ u8 ] ) -> Table { let mut arr = [ 0 ; 256 ] ; while let [ cur , rem @ .. ] = bytes { assert ! ( cur is_ascii ( ) cur b'%' " " ) ; arr [ * cur as usize ] = 1 ; bytes = rem ; } Table { arr , allows_enc : false , } }
Generates a table that only allows the given unencoded bytes.
Generates a table that only allows the given unencoded bytes .
bytes
&[u8]
bytes
&[u8]
panics
Panics if any of the bytes is not ASCII or is `%`.
Panics if any of the bytes is not ASCII or is ` % ` .