pub enum GlossType {
RegularTranslation,
Explanation,
FigurativeSpeech,
LiteralTranslation,
Trademark,
}
Expand description
Type of gloss.
Variants§
Trait Implementations§
Source§impl Enum for GlossType
impl Enum for GlossType
Source§fn code(&self) -> &'static str
fn code(&self) -> &'static str
Returns the string that marks this enum variant in the JMdict. For values that JMdict
represents as XML entities, only the entity name is returned, e.g.
adj-n
instead of
&adj-n;
.Source§fn constant_name(&self) -> &'static str
fn constant_name(&self) -> &'static str
Returns the variant name. This is used to generate Rust code for this enum. The
impl Display
for enums uses this same representation.Source§fn from_code(text: &str) -> Option<Self>
fn from_code(text: &str) -> Option<Self>
Parses a representation from the JMdict file into a value of this enum. This is the reverse
of
self.code()
, i.e. Self::from_code(self.code()) == Some(self)
.Source§fn from_constant_name(text: &str) -> Option<Self>
fn from_constant_name(text: &str) -> Option<Self>
Returns the variant that is identified the given name in Rust code, or
None
if there is no
such variant. This is the reverse of self.constant_name()
, i.e.
Self::from_constant_name(self.constant_name()) == Some(self)
.Source§fn all_variants() -> &'static [Self]
fn all_variants() -> &'static [Self]
Returns a list of all variant values in this enum. No particular order is guaranteed or
implied.
Source§impl EnumPayload for GlossType
impl EnumPayload for GlossType
impl Copy for GlossType
impl Eq for GlossType
impl StructuralPartialEq for GlossType
Auto Trait Implementations§
impl Freeze for GlossType
impl RefUnwindSafe for GlossType
impl Send for GlossType
impl Sync for GlossType
impl Unpin for GlossType
impl UnwindSafe for GlossType
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