pub trait StaticStrUnion: Union {
// Required methods
fn strs() -> Vec<&'static str>
where Self: Sized;
fn as_str(&self) -> &'static str;
fn try_from_str(value: &str) -> Result<Self>
where Self: Sized;
}
Expand description
A trait for representing a &'static str
union
Don’t implement this trait manually, use the union
macro instead
Required Methods§
Sourcefn try_from_str(value: &str) -> Result<Self>where
Self: Sized,
fn try_from_str(value: &str) -> Result<Self>where
Self: Sized,
Tries to convert a &'static str
to Self