Skip to main content

resource

Function resource 

Source
pub fn resource(name: &str) -> Option<Vec<u8>>
Expand description

Reads a file from the package’s resources/ by its path there, such as words/en.txt: None when the package has none by that name, or it is empty. Hammer reads it from the package on every call, so keep one you use often.