Word

Struct Word 

Source
pub struct Word<'a> {
    pub dictionary: &'a str,
    pub reading: Option<&'a str>,
    pub sense: Option<u32>,
    pub form: Option<&'a str>,
    pub checked: bool,
}
Expand description

Information about a Japanese word found in an Example.

Fields§

§dictionary: &'a str

The dictionary form of the word.

§reading: Option<&'a str>

A reading in hiragana.

This is to resolve cases where the word can be read different ways. WWWJDIC uses this to ensure that only the appropriate sentences are linked. The reading is in “round” parentheses.

§sense: Option<u32>

A sense number.

This occurs when the word has multiple senses in the EDICT file, and indicates which sense applies in the sentence. WWWJDIC displays these numbers. The sense number is in “square” parentheses.

§form: Option<&'a str>

The form in which the word appears in the sentence.

This will differ from the indexing word if it has been inflected, for example. This field is in “curly” parentheses.

§checked: bool

Indicates that the sentence pair is a good and checked example of the usage of the word.

Words are marked to enable appropriate sentences to be selected by dictionary software. Typically only one instance per sense of a word will be marked. The WWWJDIC server displays these sentences below the display of the related dictionary entry.

Trait Implementations§

Source§

impl<'a> Debug for Word<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> PartialEq for Word<'a>

Source§

fn eq(&self, other: &Word<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> StructuralPartialEq for Word<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Word<'a>

§

impl<'a> RefUnwindSafe for Word<'a>

§

impl<'a> Send for Word<'a>

§

impl<'a> Sync for Word<'a>

§

impl<'a> Unpin for Word<'a>

§

impl<'a> UnwindSafe for Word<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.