#[non_exhaustive]pub struct CustomVocabularyItemBuilder { /* private fields */ }Expand description
A builder for CustomVocabularyItem.
Implementations§
source§impl CustomVocabularyItemBuilder
impl CustomVocabularyItemBuilder
sourcepub fn item_id(self, input: impl Into<String>) -> Self
pub fn item_id(self, input: impl Into<String>) -> Self
The unique item identifer for the custom vocabulary item from the custom vocabulary list.
This field is required.sourcepub fn set_item_id(self, input: Option<String>) -> Self
pub fn set_item_id(self, input: Option<String>) -> Self
The unique item identifer for the custom vocabulary item from the custom vocabulary list.
sourcepub fn get_item_id(&self) -> &Option<String>
pub fn get_item_id(&self) -> &Option<String>
The unique item identifer for the custom vocabulary item from the custom vocabulary list.
sourcepub fn phrase(self, input: impl Into<String>) -> Self
pub fn phrase(self, input: impl Into<String>) -> Self
The unique phrase for the 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 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 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 for the 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 for the 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 for the 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 DisplayAs value for the 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 DisplayAs value for the 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 DisplayAs value for the custom vocabulary item from the custom vocabulary list.
sourcepub fn build(self) -> Result<CustomVocabularyItem, BuildError>
pub fn build(self) -> Result<CustomVocabularyItem, BuildError>
Consumes the builder and constructs a CustomVocabularyItem.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for CustomVocabularyItemBuilder
impl Clone for CustomVocabularyItemBuilder
source§fn clone(&self) -> CustomVocabularyItemBuilder
fn clone(&self) -> CustomVocabularyItemBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CustomVocabularyItemBuilder
impl Debug for CustomVocabularyItemBuilder
source§impl Default for CustomVocabularyItemBuilder
impl Default for CustomVocabularyItemBuilder
source§fn default() -> CustomVocabularyItemBuilder
fn default() -> CustomVocabularyItemBuilder
impl StructuralPartialEq for CustomVocabularyItemBuilder
Auto Trait Implementations§
impl Freeze for CustomVocabularyItemBuilder
impl RefUnwindSafe for CustomVocabularyItemBuilder
impl Send for CustomVocabularyItemBuilder
impl Sync for CustomVocabularyItemBuilder
impl Unpin for CustomVocabularyItemBuilder
impl UnwindSafe for CustomVocabularyItemBuilder
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