[][src]Struct friendly_zoo::Zoo

pub struct Zoo { /* fields omitted */ }

A friendly zoo.

The zoo can generate animals. Each animal can have between 0 and u32::MAX adjectives, and a race. The number of adjectives and the delimiter between the adjectives and the animal are set during instantiation. For one adjective, and _ as the delimiter, use the Default implementation of Zoo.

Example

Just generate a friendly animal name:

use friendly_zoo::Zoo;
let animal = Zoo::default().generate();
println!("{}", animal);

Generate a really fancy animal:

use friendly_zoo::Zoo;
let animal = Zoo::new('$', 6).generate();
println!("{}", animal);

Implementations

impl Zoo[src]

pub fn new(delimiter: char, number_of_adjectives: u8) -> Self[src]

pub fn generate(&self) -> String[src]

Trait Implementations

impl Default for Zoo[src]

Auto Trait Implementations

impl RefUnwindSafe for Zoo

impl Send for Zoo

impl Sync for Zoo

impl Unpin for Zoo

impl UnwindSafe for Zoo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,