[][src]Struct dces::prelude::StringComponentBuilder

pub struct StringComponentBuilder { /* fields omitted */ }

The StringComponentBuilder is used to build a set of string key based components.

Implementations

impl StringComponentBuilder[src]

pub fn new() -> Self[src]

Creates an new builder with default values.

pub fn with<C: Component>(self, key: &str, component: C) -> Self[src]

Adds a component of type C to the entity.

pub fn with_shared<C: Component>(self, key: &str, source: Entity) -> Self[src]

Adds an entity as source for a shared component of type C.

pub fn with_shared_source_key<C: Component>(
    self,
    key: &str,
    source_key: &str,
    source: Entity
) -> Self
[src]

Adds an entity as source for a shared component of type C.

pub fn build(
    self
) -> (HashMap<String, Box<dyn Any>>, HashMap<String, (Entity, String)>)
[src]

Finishing the creation of the entity.

Trait Implementations

impl Default for StringComponentBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<E> Component for E where
    E: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.