#[non_exhaustive]pub struct ComponentChildBuilder { /* private fields */ }Expand description
A builder for ComponentChild.
Implementations§
source§impl ComponentChildBuilder
impl ComponentChildBuilder
sourcepub fn component_type(self, input: impl Into<String>) -> Self
pub fn component_type(self, input: impl Into<String>) -> Self
The type of the child component.
This field is required.sourcepub fn set_component_type(self, input: Option<String>) -> Self
pub fn set_component_type(self, input: Option<String>) -> Self
The type of the child component.
sourcepub fn get_component_type(&self) -> &Option<String>
pub fn get_component_type(&self) -> &Option<String>
The type of the child component.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the child component.
This field is required.sourcepub fn properties(self, k: impl Into<String>, v: ComponentProperty) -> Self
pub fn properties(self, k: impl Into<String>, v: ComponentProperty) -> Self
Adds a key-value pair to properties.
To override the contents of this collection use set_properties.
Describes the properties of the child component. You can't specify tags as a valid property for properties.
sourcepub fn set_properties(
self,
input: Option<HashMap<String, ComponentProperty>>
) -> Self
pub fn set_properties( self, input: Option<HashMap<String, ComponentProperty>> ) -> Self
Describes the properties of the child component. You can't specify tags as a valid property for properties.
sourcepub fn get_properties(&self) -> &Option<HashMap<String, ComponentProperty>>
pub fn get_properties(&self) -> &Option<HashMap<String, ComponentProperty>>
Describes the properties of the child component. You can't specify tags as a valid property for properties.
sourcepub fn children(self, input: ComponentChild) -> Self
pub fn children(self, input: ComponentChild) -> Self
Appends an item to children.
To override the contents of this collection use set_children.
The list of ComponentChild instances for this component.
sourcepub fn set_children(self, input: Option<Vec<ComponentChild>>) -> Self
pub fn set_children(self, input: Option<Vec<ComponentChild>>) -> Self
The list of ComponentChild instances for this component.
sourcepub fn get_children(&self) -> &Option<Vec<ComponentChild>>
pub fn get_children(&self) -> &Option<Vec<ComponentChild>>
The list of ComponentChild instances for this component.
sourcepub fn events(self, k: impl Into<String>, v: ComponentEvent) -> Self
pub fn events(self, k: impl Into<String>, v: ComponentEvent) -> Self
Adds a key-value pair to events.
To override the contents of this collection use set_events.
Describes the events that can be raised on the child component. Use for the workflow feature in Amplify Studio that allows you to bind events and actions to components.
sourcepub fn set_events(self, input: Option<HashMap<String, ComponentEvent>>) -> Self
pub fn set_events(self, input: Option<HashMap<String, ComponentEvent>>) -> Self
Describes the events that can be raised on the child component. Use for the workflow feature in Amplify Studio that allows you to bind events and actions to components.
sourcepub fn get_events(&self) -> &Option<HashMap<String, ComponentEvent>>
pub fn get_events(&self) -> &Option<HashMap<String, ComponentEvent>>
Describes the events that can be raised on the child component. Use for the workflow feature in Amplify Studio that allows you to bind events and actions to components.
sourcepub fn source_id(self, input: impl Into<String>) -> Self
pub fn source_id(self, input: impl Into<String>) -> Self
The unique ID of the child component in its original source system, such as Figma.
sourcepub fn set_source_id(self, input: Option<String>) -> Self
pub fn set_source_id(self, input: Option<String>) -> Self
The unique ID of the child component in its original source system, such as Figma.
sourcepub fn get_source_id(&self) -> &Option<String>
pub fn get_source_id(&self) -> &Option<String>
The unique ID of the child component in its original source system, such as Figma.
sourcepub fn build(self) -> Result<ComponentChild, BuildError>
pub fn build(self) -> Result<ComponentChild, BuildError>
Consumes the builder and constructs a ComponentChild.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ComponentChildBuilder
impl Clone for ComponentChildBuilder
source§fn clone(&self) -> ComponentChildBuilder
fn clone(&self) -> ComponentChildBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ComponentChildBuilder
impl Debug for ComponentChildBuilder
source§impl Default for ComponentChildBuilder
impl Default for ComponentChildBuilder
source§fn default() -> ComponentChildBuilder
fn default() -> ComponentChildBuilder
source§impl PartialEq for ComponentChildBuilder
impl PartialEq for ComponentChildBuilder
source§fn eq(&self, other: &ComponentChildBuilder) -> bool
fn eq(&self, other: &ComponentChildBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ComponentChildBuilder
Auto Trait Implementations§
impl Freeze for ComponentChildBuilder
impl RefUnwindSafe for ComponentChildBuilder
impl Send for ComponentChildBuilder
impl Sync for ComponentChildBuilder
impl Unpin for ComponentChildBuilder
impl UnwindSafe for ComponentChildBuilder
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