pub struct Noun { /* private fields */ }Expand description
Has the Ranting trait. Often you may want to #[derive(Ranting)] and sometimes override some
of the trait functions.
Implementations§
Trait Implementations§
Source§impl Ranting for &Noun
impl Ranting for &Noun
Source§fn name(&self, uc: bool) -> String
fn name(&self, uc: bool) -> String
return the name, which is struct name or the
#{ranting(name = "..")] value, or self.name
if the name attribute was set to “$”Source§fn subjective(&self) -> &str
fn subjective(&self) -> &str
return the subject: “it” or the
#{ranting(subject = "..")] value; self.subject if “$”.Source§fn is_plural(&self) -> bool
fn is_plural(&self) -> bool
return if plural (the subject, or if you, the
#{ranting(plural_you = "true/false")] value,
default falseSource§fn inflect(&self, as_plural: bool, uc: bool) -> String
fn inflect(&self, as_plural: bool, uc: bool) -> String
return the singular or plural form as configured, starting with capital if uc is set.
use
#{ranting(singular_end = "..", plural_end = "..")] if not plural = singular + “s”Source§fn skip_article(&self) -> bool
fn skip_article(&self) -> bool
If an article is only required when emphasizing, set
#{ranting(no_article = "true")],
and this function will return accordingly (used by placeholders).Source§impl Ranting for &mut Noun
impl Ranting for &mut Noun
Source§fn name(&self, uc: bool) -> String
fn name(&self, uc: bool) -> String
return the name, which is struct name or the
#{ranting(name = "..")] value, or self.name
if the name attribute was set to “$”Source§fn subjective(&self) -> &str
fn subjective(&self) -> &str
return the subject: “it” or the
#{ranting(subject = "..")] value; self.subject if “$”.Source§fn is_plural(&self) -> bool
fn is_plural(&self) -> bool
return if plural (the subject, or if you, the
#{ranting(plural_you = "true/false")] value,
default falseSource§fn inflect(&self, as_plural: bool, uc: bool) -> String
fn inflect(&self, as_plural: bool, uc: bool) -> String
return the singular or plural form as configured, starting with capital if uc is set.
use
#{ranting(singular_end = "..", plural_end = "..")] if not plural = singular + “s”Source§fn skip_article(&self) -> bool
fn skip_article(&self) -> bool
If an article is only required when emphasizing, set
#{ranting(no_article = "true")],
and this function will return accordingly (used by placeholders).Source§impl Ranting for Noun
impl Ranting for Noun
Source§fn name(&self, uc: bool) -> String
fn name(&self, uc: bool) -> String
return the name, which is struct name or the
#{ranting(name = "..")] value, or self.name
if the name attribute was set to “$”Source§fn subjective(&self) -> &str
fn subjective(&self) -> &str
return the subject: “it” or the
#{ranting(subject = "..")] value; self.subject if “$”.Source§fn is_plural(&self) -> bool
fn is_plural(&self) -> bool
return if plural (the subject, or if you, the
#{ranting(plural_you = "true/false")] value,
default falseSource§fn inflect(&self, as_plural: bool, uc: bool) -> String
fn inflect(&self, as_plural: bool, uc: bool) -> String
return the singular or plural form as configured, starting with capital if uc is set.
use
#{ranting(singular_end = "..", plural_end = "..")] if not plural = singular + “s”Source§fn skip_article(&self) -> bool
fn skip_article(&self) -> bool
If an article is only required when emphasizing, set
#{ranting(no_article = "true")],
and this function will return accordingly (used by placeholders).Auto Trait Implementations§
impl Freeze for Noun
impl RefUnwindSafe for Noun
impl Send for Noun
impl Sync for Noun
impl Unpin for Noun
impl UnwindSafe for Noun
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