pub struct DynComponent { /* private fields */ }Expand description
A dynamically-typed component for heterogeneous collections.
This type wraps any Component implementation and provides dynamic dispatch,
allowing you to store different component types in the same collection.
§Examples
ⓘ
use sacp::DynComponent;
let components: Vec<DynComponent> = vec![
DynComponent::new(Proxy1),
DynComponent::new(Proxy2),
DynComponent::new(Agent),
];Implementations§
Trait Implementations§
Source§impl Component for DynComponent
impl Component for DynComponent
Auto Trait Implementations§
impl Freeze for DynComponent
impl !RefUnwindSafe for DynComponent
impl Send for DynComponent
impl !Sync for DynComponent
impl Unpin for DynComponent
impl !UnwindSafe for DynComponent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more