#[non_exhaustive]pub struct ComponentVariantBuilder { /* private fields */ }Expand description
A builder for ComponentVariant.
Implementations§
source§impl ComponentVariantBuilder
impl ComponentVariantBuilder
sourcepub fn variant_values(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn variant_values(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to variant_values.
To override the contents of this collection use set_variant_values.
The combination of variants that comprise this variant. You can't specify tags as a valid property for variantValues.
sourcepub fn set_variant_values(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_variant_values(self, input: Option<HashMap<String, String>>) -> Self
The combination of variants that comprise this variant. You can't specify tags as a valid property for variantValues.
sourcepub fn get_variant_values(&self) -> &Option<HashMap<String, String>>
pub fn get_variant_values(&self) -> &Option<HashMap<String, String>>
The combination of variants that comprise this variant. You can't specify tags as a valid property for variantValues.
sourcepub fn overrides(self, k: impl Into<String>, v: HashMap<String, String>) -> Self
pub fn overrides(self, k: impl Into<String>, v: HashMap<String, String>) -> Self
Adds a key-value pair to overrides.
To override the contents of this collection use set_overrides.
The properties of the component variant that can be overriden when customizing an instance of the component. You can't specify tags as a valid property for overrides.
sourcepub fn set_overrides(
self,
input: Option<HashMap<String, HashMap<String, String>>>
) -> Self
pub fn set_overrides( self, input: Option<HashMap<String, HashMap<String, String>>> ) -> Self
The properties of the component variant that can be overriden when customizing an instance of the component. You can't specify tags as a valid property for overrides.
sourcepub fn get_overrides(&self) -> &Option<HashMap<String, HashMap<String, String>>>
pub fn get_overrides(&self) -> &Option<HashMap<String, HashMap<String, String>>>
The properties of the component variant that can be overriden when customizing an instance of the component. You can't specify tags as a valid property for overrides.
sourcepub fn build(self) -> ComponentVariant
pub fn build(self) -> ComponentVariant
Consumes the builder and constructs a ComponentVariant.
Trait Implementations§
source§impl Clone for ComponentVariantBuilder
impl Clone for ComponentVariantBuilder
source§fn clone(&self) -> ComponentVariantBuilder
fn clone(&self) -> ComponentVariantBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ComponentVariantBuilder
impl Debug for ComponentVariantBuilder
source§impl Default for ComponentVariantBuilder
impl Default for ComponentVariantBuilder
source§fn default() -> ComponentVariantBuilder
fn default() -> ComponentVariantBuilder
source§impl PartialEq for ComponentVariantBuilder
impl PartialEq for ComponentVariantBuilder
source§fn eq(&self, other: &ComponentVariantBuilder) -> bool
fn eq(&self, other: &ComponentVariantBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ComponentVariantBuilder
Auto Trait Implementations§
impl Freeze for ComponentVariantBuilder
impl RefUnwindSafe for ComponentVariantBuilder
impl Send for ComponentVariantBuilder
impl Sync for ComponentVariantBuilder
impl Unpin for ComponentVariantBuilder
impl UnwindSafe for ComponentVariantBuilder
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> 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