[−][src]Struct orbtk_api::macros::ComponentBuilder
The TypeComponentBuilder
is used to build a set of type key based components.
Implementations
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]
C: Component,
Adds a component of type C
to the entity.
pub fn with_shared<C>(self, source: Entity) -> TypeComponentBuilder where
C: Component,
[src]
C: Component,
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]
self
) -> (HashMap<TypeId, Box<dyn Any + 'static>, RandomState>, HashMap<TypeId, Entity, RandomState>)
Finishing the creation of the entity.
Trait Implementations
impl Default for TypeComponentBuilder
[src]
fn default() -> TypeComponentBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TypeComponentBuilder
impl !Send for TypeComponentBuilder
impl !Sync for TypeComponentBuilder
impl Unpin for TypeComponentBuilder
impl !UnwindSafe for TypeComponentBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,