Function check
Source pub const fn check(byte: u8) -> Result<(), Error>
Expand description
Checks that the given byte is valid.
§Examples
use pkce_std::check::bytes::check;
let minus = b'-';
let plus = b'+';
assert!(check(minus).is_ok());
assert!(check(plus).is_err());
§Errors
Returns Error if the byte is invalid.