[][src]Struct verba::noun::regular::Regular

pub struct Regular { /* fields omitted */ }

Methods

impl Regular[src]

pub fn new(
    nominative: String,
    genitive: String,
    gender: Gender
) -> Result<Regular, RegularError>
[src]

Creates a regular Latin noun.

The dictionary form of a regular Latin noun consistes of its nominative and genitive forms. For example, for the second declension neuter noun bellum, war, the dictionary form would be bellum, bellī. Latin nouns are also gendered. Latin, like German, has three genders: masculine, feminine, and neuter.

This function takes a nominative and genitive form and a gender. With this information, the correct declined form for any case can be determined.

Warning

Third declension nouns can be either consonant-stem or i-stem. Third declension nouns created with this function will decline as consonant- stem. When creating a third declension i-stem noun, use [new_third_i_stem] instead.

Example

use verba::noun as N;
 
let nominative = "bellum".to_string();
let genitive = "bellī".to_string();
 
let noun = N::Regular::new(nominative, genitive, N::Gender::Neuter);

pub fn new_third_i_stem(
    nominative: String,
    genitive: String,
    gender: Gender
) -> Result<Regular, RegularError>
[src]

Creates a regular third declension Latin noun that declines as an i-stem rather than a consonant stem.

Example

use verba::noun as N;
use verba::noun::{Noun};
 
let nominative = "animal".to_string();
let genitive = "animālis".to_string();
 
let noun = N::Regular::new_third_i_stem(nominative, genitive, N::Gender::Neuter).unwrap();
 
assert_eq!(noun.decline(N::Number::Plural, N::Case::Genitive), Some(vec!["animālium".to_string()]));

Trait Implementations

impl Noun for Regular[src]

impl Clone for Regular[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Display for Regular[src]

impl Debug for Regular[src]

Auto Trait Implementations

impl Sync for Regular

impl Send for Regular

impl Unpin for Regular

impl RefUnwindSafe for Regular

impl UnwindSafe for Regular

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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