Crate gear_objects

Source

Macros§

add_object
Use this to add an object along with its associated traits to a component. Note that repeated traits are listed in a second optional list.
find_repeated_trait
Returns an iterator over a trait that may be implemented by multiple objects within the component.
find_repeated_trait_mut
Returns an iterator over a trait that may be implemented by multiple objects within the component.
find_trait
Returns an optional reference to a trait for an object within the component.
find_trait_mut
The borrowing rules for components are the standard rust rules: mutable references are exclusive references. But they apply to individual objects within a component so it’s possible to simultaneously get two mutable references to two different objects within a component but not two mutable references to the same object (this is checked at runtime).
has_trait
register_type
Use this for all trait and object types used within components.

Structs§

Component
The unit of composition for the gear object model. A component consists of one or more objects. Each object implements one or more traits. Component clients are only allowed to interact with objects via their traits. Note that publicly released traits should be treated as immutable to foster backward compatibility.
ComponentId
Used to identify components.

Functions§

get_debug_id