Skip to main content

SyncComponent

Trait SyncComponent 

Source
pub trait SyncComponent<F = ()>: Component {
    type Target: Bundle
       where <Self::Target as DynamicBundle>::Effect: NoBundleEffect;
}
Expand description

Trait that links components from the main world with output components in the render world. It is used by SyncComponentPlugin.

The marker type F is only used as a way to bypass the orphan rules. To implement the trait for a foreign type you can use a local type as the marker, e.g. the type of the plugin that calls SyncComponentPlugin.

Required Associated Types§

Source

type Target: Bundle where <Self::Target as DynamicBundle>::Effect: NoBundleEffect

Describes what components should be removed from the render world if the implementing component is removed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§