#[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 ==.impl StructuralPartialEq for NewCustomVocabularyItemBuilder
Auto Trait Implementations§
impl Freeze for NewCustomVocabularyItemBuilder
impl RefUnwindSafe for NewCustomVocabularyItemBuilder
impl Send for NewCustomVocabularyItemBuilder
impl Sync for NewCustomVocabularyItemBuilder
impl Unpin for NewCustomVocabularyItemBuilder
impl UnwindSafe for NewCustomVocabularyItemBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more