[−][src]Struct verba::noun::regular::Regular
Methods
impl Regular
[src]
pub fn new(
nominative: String,
genitive: String,
gender: Gender
) -> Result<Regular, RegularError>
[src]
nominative: String,
genitive: String,
gender: Gender
) -> Result<Regular, RegularError>
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]
nominative: String,
genitive: String,
gender: Gender
) -> Result<Regular, RegularError>
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]
fn gender(&self) -> Gender
[src]
fn group(&self) -> Option<Group>
[src]
fn stem(&self) -> Option<&str>
[src]
fn decline(&self, number: Number, case: Case) -> Option<Vec<String>>
[src]
impl Clone for Regular
[src]
fn clone(&self) -> 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]
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,