[][src]Struct orbtk::ComponentBuilder

pub struct ComponentBuilder { /* fields omitted */ }

The TypeComponentBuilder is used to build a set of type key based components.

Methods

impl TypeComponentBuilder[src]

pub fn new() -> TypeComponentBuilder[src]

Creates an new builder with default values.

pub fn with<C>(self, component: C) -> TypeComponentBuilder where
    C: Component
[src]

Adds a component of type C to the entity.

pub fn with_shared<C>(self, source: Entity) -> TypeComponentBuilder where
    C: Component
[src]

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

pub fn with_shared_box(self, source: SharedComponentBox) -> TypeComponentBuilder[src]

Adds an entity as source for a shared component box.

pub fn with_box(self, component_box: ComponentBox) -> TypeComponentBuilder[src]

Adds a component box to the entity.

pub fn build(
    self
) -> (HashMap<TypeId, Box<dyn Any + 'static>, RandomState>, HashMap<TypeId, Entity, RandomState>)
[src]

Finishing the creation of the entity.

Trait Implementations

impl Default for TypeComponentBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

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

impl<T> SetParameter for T