[−][src]Struct dces::prelude::StringComponentBuilder
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]
self,
key: &str,
source_key: &str,
source: Entity
) -> Self
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]
self
) -> (HashMap<String, Box<dyn Any>>, HashMap<String, (Entity, String)>)
Finishing the creation of the entity.
Trait Implementations
impl Default for StringComponentBuilder
[src]
fn default() -> StringComponentBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for StringComponentBuilder
impl !Send for StringComponentBuilder
impl !Sync for StringComponentBuilder
impl Unpin for StringComponentBuilder
impl !UnwindSafe for StringComponentBuilder
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, 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>,