pub enum Curvature {
Straight,
Left,
Right,
Upwards,
Downwards,
Other(String),
}Expand description
Enum representing the direction of Curvature for a cock. This includes directions Curvature::Straight, Curvature::Left, Curvature::Right, Curvature::Upwards, Curvature::Downwards, and Curvature::Other. There’s also an Curvature::Other variant that can store a custom description as a string.
Variants§
Trait Implementations§
source§impl Display for Curvature
impl Display for Curvature
Implementation of the std::fmt::Display trait for Curvature. This allows a Curvature instance to be converted to a string for display purposes. For the Curvature::Other variant, the custom description is displayed.
source§impl FromString for Curvature
impl FromString for Curvature
Implementation of the FromString trait for Curvature. This allows a Curvature instance to be created from a string value. The Curvature::Other variant involves a user prompt for a custom description.
source§fn from_string(curvature: &str) -> Curvature
fn from_string(curvature: &str) -> Curvature
source§impl GetVariants for Curvature
impl GetVariants for Curvature
Implementation of the GetVariants trait for Curvature. This enables the creation of a vector containing all possible variants as string values.