#[non_exhaustive]pub struct NewCustomVocabularyItemBuilder { /* private fields */ }Expand description
A builder for NewCustomVocabularyItem.
Implementations§
source§impl NewCustomVocabularyItemBuilder
impl NewCustomVocabularyItemBuilder
sourcepub fn phrase(self, input: impl Into<String>) -> Self
pub fn phrase(self, input: impl Into<String>) -> Self
The unique phrase for the new custom vocabulary item from the custom vocabulary list.
This field is required.sourcepub fn set_phrase(self, input: Option<String>) -> Self
pub fn set_phrase(self, input: Option<String>) -> Self
The unique phrase for the new custom vocabulary item from the custom vocabulary list.
sourcepub fn get_phrase(&self) -> &Option<String>
pub fn get_phrase(&self) -> &Option<String>
The unique phrase for the new custom vocabulary item from the custom vocabulary list.
sourcepub fn weight(self, input: i32) -> Self
pub fn weight(self, input: i32) -> Self
The weight assigned to the new custom vocabulary item from the custom vocabulary list.
sourcepub fn set_weight(self, input: Option<i32>) -> Self
pub fn set_weight(self, input: Option<i32>) -> Self
The weight assigned to the new custom vocabulary item from the custom vocabulary list.
sourcepub fn get_weight(&self) -> &Option<i32>
pub fn get_weight(&self) -> &Option<i32>
The weight assigned to the new custom vocabulary item from the custom vocabulary list.
sourcepub fn display_as(self, input: impl Into<String>) -> Self
pub fn display_as(self, input: impl Into<String>) -> Self
The display as value assigned to the new custom vocabulary item from the custom vocabulary list.
sourcepub fn set_display_as(self, input: Option<String>) -> Self
pub fn set_display_as(self, input: Option<String>) -> Self
The display as value assigned to the new custom vocabulary item from the custom vocabulary list.
sourcepub fn get_display_as(&self) -> &Option<String>
pub fn get_display_as(&self) -> &Option<String>
The display as value assigned to the new custom vocabulary item from the custom vocabulary list.
sourcepub fn build(self) -> Result<NewCustomVocabularyItem, BuildError>
pub fn build(self) -> Result<NewCustomVocabularyItem, BuildError>
Consumes the builder and constructs a NewCustomVocabularyItem.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for NewCustomVocabularyItemBuilder
impl Clone for NewCustomVocabularyItemBuilder
source§fn clone(&self) -> NewCustomVocabularyItemBuilder
fn clone(&self) -> NewCustomVocabularyItemBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for NewCustomVocabularyItemBuilder
impl Default for NewCustomVocabularyItemBuilder
source§fn default() -> NewCustomVocabularyItemBuilder
fn default() -> NewCustomVocabularyItemBuilder
source§impl PartialEq for NewCustomVocabularyItemBuilder
impl PartialEq for NewCustomVocabularyItemBuilder
source§fn eq(&self, other: &NewCustomVocabularyItemBuilder) -> bool
fn eq(&self, other: &NewCustomVocabularyItemBuilder) -> bool
self and other values to be equal, and is used
by ==.