[−][src]Struct rnglib::RNG
RNG (Random Name Generator) is a library that generates random names based upon one of the available Languages.
Usage:
use rnglib::{RNG, Language}; let rng = RNG::new(&Language::Elven).unwrap(); let first_name = rng.generate_name(); let last_name = rng.generate_name(); println!("{}: {} {}", rng.name, first_name, last_name)
Fields
name: String
prefixes: Syllables
centers: Syllables
suffixes: Syllables
bad_syllables: Vec<String>
Implementations
impl RNG
[src]
pub fn new(language: &Language) -> Result<RNG, RNG>
[src]
pub fn empty(name: String) -> RNG
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_valid(&self) -> bool
[src]
pub fn generate(language: &Language) -> RNG
[src]
pub fn generate_name(&self) -> String
[src]
pub fn generate_short(&self) -> String
[src]
pub fn generate_name_by_count(&self, count: u8) -> String
[src]
pub fn generate_syllables(&self) -> Syllables
[src]
pub fn generate_syllables_by_count(&self, syllable_count: u8) -> Syllables
[src]
pub fn syllables(&self) -> Syllables
[src]
Trait Implementations
impl Clone for RNG
[src]
impl Debug for RNG
[src]
impl PartialEq<RNG> for RNG
[src]
impl StructuralPartialEq for RNG
[src]
Auto Trait Implementations
impl RefUnwindSafe for RNG
impl Send for RNG
impl Sync for RNG
impl Unpin for RNG
impl UnwindSafe for RNG
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,