You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to #296 , but instead of prefixing str infront, we add it behind:
use strum_macros::AsRefStr;#[derive(AsRefStr)]#[strum(prefix = "path/to/file/", suffix = ".asset")]enumAssetTypes{Filename,}fnmain(){println!("{}",AssetTypes::Filename.as_ref());// prints "path/to/file/Filename.asset"}
This could be useful for using enum types for specifying file paths, among many other things.
The text was updated successfully, but these errors were encountered:
This is similar to #296 , but instead of prefixing str infront, we add it behind:
This could be useful for using
enum
types for specifying file paths, among many other things.The text was updated successfully, but these errors were encountered: