pub enum SubjectPronoun {
I,
You,
Thou,
He,
She,
It,
We,
Ye,
They,
}Expand description
An enum with pronouns in subjective form.
Variants§
Implementations§
Source§impl SubjectPronoun
impl SubjectPronoun
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The canonical spelling accepted by FromStr for this pronoun — the
inverse of SubjectPronoun::from_str. Used to store a typed pronoun on
Noun while keeping the string-based Ranting::subjective(&self) -> &str
contract (and ranting_derive’s generated self.subject.as_str() call
sites, which predate this type and are shared with user-defined structs
that still declare a plain subject: String field) unchanged.
Trait Implementations§
Source§impl Clone for SubjectPronoun
impl Clone for SubjectPronoun
Source§fn clone(&self) -> SubjectPronoun
fn clone(&self) -> SubjectPronoun
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SubjectPronoun
Source§impl Debug for SubjectPronoun
impl Debug for SubjectPronoun
Source§impl FromStr for SubjectPronoun
impl FromStr for SubjectPronoun
Source§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<SubjectPronoun, <SubjectPronoun as FromStr>::Err>
fn from_str(s: &str) -> Result<SubjectPronoun, <SubjectPronoun as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl IntoEnumIterator for SubjectPronoun
impl IntoEnumIterator for SubjectPronoun
type Iterator = SubjectPronounIter
fn iter() -> SubjectPronounIter ⓘ
Source§impl TryFrom<&str> for SubjectPronoun
impl TryFrom<&str> for SubjectPronoun
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(
s: &str,
) -> Result<SubjectPronoun, <SubjectPronoun as TryFrom<&str>>::Error>
fn try_from( s: &str, ) -> Result<SubjectPronoun, <SubjectPronoun as TryFrom<&str>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SubjectPronoun
impl RefUnwindSafe for SubjectPronoun
impl Send for SubjectPronoun
impl Sync for SubjectPronoun
impl Unpin for SubjectPronoun
impl UnsafeUnpin for SubjectPronoun
impl UnwindSafe for SubjectPronoun
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