Skip to main content

LockingProvideRef

Trait LockingProvideRef 

Source
pub trait LockingProvideRef<P, C>
where P: Port + 'static, C: ComponentDefinition + 'static + Provide<P> + ProvideRef<P>,
{ // Required methods fn provided_ref(&self) -> ProvidedRef<P>; fn connect_to_required(&self, req: RequiredRef<P>) -> ProviderChannel<P, C>; }
Expand description

Same as ProvideRef, but for instances that must be locked first

This is used, for example, with an Arc<Component<_>>.

Required Methods§

Source

fn provided_ref(&self) -> ProvidedRef<P>

Returns a required reference to this component’s port instance of type P

Source

fn connect_to_required(&self, req: RequiredRef<P>) -> ProviderChannel<P, C>

Connects this component’s required port instance of type P to prov

Implementations on Foreign Types§

Source§

impl<P, CD> LockingProvideRef<P, CD> for Arc<Component<CD>>
where P: Port + 'static, CD: ComponentTraits + ComponentLifecycle + Provide<P> + ProvideRef<P>,

Implementors§