pub enum Shape {
Cylindrical,
Tapered,
Other(String),
}Expand description
Enum representing the Shape for a cock. The shapes include Shape::Cylindrical, Shape::Tapered and an Shape::Other variant that can store a custom Shape description as a string.
Variants§
Implementations§
Trait Implementations§
source§impl Display for Shape
impl Display for Shape
Implementation of the std::fmt::Display trait for Shape. This allows a Shape instance to be converted to a string for display purposes. For the Shape::Other variant, the custom shape description is displayed.
source§impl FromString for Shape
impl FromString for Shape
Implementation of the FromString trait for Shape. This allows a Shape instance to be created from a string value. The Shape::Other variant involves a user prompt for a custom shape description.
source§fn from_string(shape: &str) -> Shape
fn from_string(shape: &str) -> Shape
Function to create an instance of the type implementing this trait from a string.
source§impl GetVariants for Shape
impl GetVariants for Shape
Implementation of the GetVariants trait for Shape. This enables the creation of a vector containing all possible variants as string values.
source§fn get_variants() -> Vec<String>
fn get_variants() -> Vec<String>
Function to get the variants of the object.
source§impl PartialEq<Shape> for Shape
impl PartialEq<Shape> for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more