#[non_exhaustive]pub struct EntityItemBuilder { /* private fields */ }Expand description
A builder for EntityItem.
Implementations§
source§impl EntityItemBuilder
impl EntityItemBuilder
sourcepub fn identifier(self, input: EntityIdentifier) -> Self
pub fn identifier(self, input: EntityIdentifier) -> Self
The identifier of the entity.
This field is required.sourcepub fn set_identifier(self, input: Option<EntityIdentifier>) -> Self
pub fn set_identifier(self, input: Option<EntityIdentifier>) -> Self
The identifier of the entity.
sourcepub fn get_identifier(&self) -> &Option<EntityIdentifier>
pub fn get_identifier(&self) -> &Option<EntityIdentifier>
The identifier of the entity.
sourcepub fn attributes(self, k: impl Into<String>, v: AttributeValue) -> Self
pub fn attributes(self, k: impl Into<String>, v: AttributeValue) -> Self
Adds a key-value pair to attributes.
To override the contents of this collection use set_attributes.
A list of attributes for the entity.
sourcepub fn set_attributes(
self,
input: Option<HashMap<String, AttributeValue>>
) -> Self
pub fn set_attributes( self, input: Option<HashMap<String, AttributeValue>> ) -> Self
A list of attributes for the entity.
sourcepub fn get_attributes(&self) -> &Option<HashMap<String, AttributeValue>>
pub fn get_attributes(&self) -> &Option<HashMap<String, AttributeValue>>
A list of attributes for the entity.
sourcepub fn parents(self, input: EntityIdentifier) -> Self
pub fn parents(self, input: EntityIdentifier) -> Self
Appends an item to parents.
To override the contents of this collection use set_parents.
The parents in the hierarchy that contains the entity.
sourcepub fn set_parents(self, input: Option<Vec<EntityIdentifier>>) -> Self
pub fn set_parents(self, input: Option<Vec<EntityIdentifier>>) -> Self
The parents in the hierarchy that contains the entity.
sourcepub fn get_parents(&self) -> &Option<Vec<EntityIdentifier>>
pub fn get_parents(&self) -> &Option<Vec<EntityIdentifier>>
The parents in the hierarchy that contains the entity.
sourcepub fn build(self) -> EntityItem
pub fn build(self) -> EntityItem
Consumes the builder and constructs a EntityItem.
Trait Implementations§
source§impl Clone for EntityItemBuilder
impl Clone for EntityItemBuilder
source§fn clone(&self) -> EntityItemBuilder
fn clone(&self) -> EntityItemBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for EntityItemBuilder
impl Debug for EntityItemBuilder
source§impl Default for EntityItemBuilder
impl Default for EntityItemBuilder
source§fn default() -> EntityItemBuilder
fn default() -> EntityItemBuilder
Returns the “default value” for a type. Read more
source§impl PartialEq for EntityItemBuilder
impl PartialEq for EntityItemBuilder
source§fn eq(&self, other: &EntityItemBuilder) -> bool
fn eq(&self, other: &EntityItemBuilder) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for EntityItemBuilder
Auto Trait Implementations§
impl Freeze for EntityItemBuilder
impl RefUnwindSafe for EntityItemBuilder
impl Send for EntityItemBuilder
impl Sync for EntityItemBuilder
impl Unpin for EntityItemBuilder
impl UnwindSafe for EntityItemBuilder
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
Mutably borrows from an owned value. Read more
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>
Creates a shared type from an unshared type.