Lines Matching refs:input
13 fn from_hex(input: &str) -> Result<u8, std::num::ParseIntError> {
14 u8::from_str_radix(input, 16)
21 fn hex_primary(input: &str) -> IResult<&str, u8> {
22 map_res(take_while_m_n(2, 2, is_hex_digit), from_hex)(input)
25 fn hex_color(input: &str) -> IResult<&str, Color> {
26 let (input, _) = tag("#")(input)?;
27 let (input, (red, green, blue)) = tuple((hex_primary, hex_primary, hex_primary))(input)?;
29 Ok((input, Color { red, green, blue }))