[−][src]Struct datamuse_api_wrapper::WordElement
This struct represents each word and its associated data in the response. It is constructed when parsing a Response with the method list(). Note that all optional values can still be None even if the proper flag is set
Fields
word: String
The word returned based on the search parameters
score: usize
A score which ranks the word based on how well it fit the provided parameters. Note that by default the words are ranked by score from highest to lowest
num_syllables: Option<usize>
The number of syllables the word has. This will only have a value if the meta data flag SyllableCount is set
parts_of_speech: Option<Vec<PartOfSpeech>>
The part(s) of speech a word can be. This will only have a value if the meta data flag PartsOfSpeech is set
pronunciation: Option<String>
The pronunciation of the word. This will only have a value if the meta data flag Pronunciation is set. If an IPA pronuncation is available, it takes precedence as it is optional
frequency: Option<f32>
The frequency of a word based on how many times the word is used per 1,000,000 words of text. This will only have a value if the meta data flag WordFrequency is set
definitions: Option<Vec<Definition>>
Definitions of a word and the associated part of speech with its use. This will only have a value if the meta data flag Definitions is set
Trait Implementations
impl Debug for WordElement
[src]
impl PartialEq<WordElement> for WordElement
[src]
pub fn eq(&self, other: &WordElement) -> bool
[src]
pub fn ne(&self, other: &WordElement) -> bool
[src]
impl StructuralPartialEq for WordElement
[src]
Auto Trait Implementations
impl RefUnwindSafe for WordElement
[src]
impl Send for WordElement
[src]
impl Sync for WordElement
[src]
impl Unpin for WordElement
[src]
impl UnwindSafe for WordElement
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,