pub struct Owl {
pub beak: Beak,
pub eyes: Eyes,
pub head: Head,
pub wing_shape: WingShape,
pub wings: Wings,
}Expand description
Create an Owl
§Example
println!("{}", Owl::default());
println!("{}", Owl::random());
println!("{}",
Owl {
beak: Beak::Happy,
eyes: Eyes::Happy,
head: Head::Curly,
wing_shape: WingShape::None,
wings: Wings::Outward
}
);Fields§
§beak: Beak§eyes: Eyes§head: Head§wing_shape: WingShape§wings: WingsImplementations§
Source§impl Owl
impl Owl
Sourcepub fn generate_random() -> Self
pub fn generate_random() -> Self
Generates a random instance of this type
Sourcepub fn generate_random_customize<T: FnOnce(&mut Self)>(customize: T) -> Self
pub fn generate_random_customize<T: FnOnce(&mut Self)>(customize: T) -> Self
Generates a random instance of this type with the possibility to customize it
Trait Implementations§
Source§impl Distribution<Owl> for Standard
impl Distribution<Owl> for Standard
Auto Trait Implementations§
impl Freeze for Owl
impl RefUnwindSafe for Owl
impl Send for Owl
impl Sync for Owl
impl Unpin for Owl
impl UnwindSafe for Owl
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