Function is_rust::is_rust [] [src]

pub fn is_rust<D: Display>(string: D) -> bool

Returns whether a value is rust.

This returns true if the value is "rust", the hex value "b7410e", or the RGB value 173, 65, 14.

Examples

Rust should be rust:

assert!(is_rust::is_rust("rust")); // is rust even a word anymore?
assert!(is_rust::is_rust("#b7410e"));
assert!(is_rust::is_rust("rgb(173, 65, 14)"));

Python and Ruby are not rust:

assert!(!is_rust::is_rust("python"));
assert!(!is_rust::is_rust("ruby"));