pub struct TestComponent1 { /* private fields */ }Expand description
A test component
Implementations§
Source§impl TestComponent1
impl TestComponent1
Sourcepub fn new() -> TestComponent1
pub fn new() -> TestComponent1
Create a new test component
Trait Implementations§
Source§impl ActorRaw for TestComponent1
impl ActorRaw for TestComponent1
Source§impl ComponentDefinition for TestComponent1
impl ComponentDefinition for TestComponent1
Source§fn setup(&mut self, self_component: Arc<Component<Self>>)
fn setup(&mut self, self_component: Arc<Component<Self>>)
Prepare the component for being run Read more
Source§fn execute(&mut self, max_events: usize, skip: usize) -> ExecuteResult
fn execute(&mut self, max_events: usize, skip: usize) -> ExecuteResult
Execute events on the component’s ports Read more
Source§fn ctx_mut(&mut self) -> &mut ComponentContext<Self>
fn ctx_mut(&mut self) -> &mut ComponentContext<Self>
Return a mutable reference the component’s context field
Source§fn ctx(&self) -> &ComponentContext<Self>
fn ctx(&self) -> &ComponentContext<Self>
Return a reference the component’s context field
Source§fn spawn_local<F>(
&mut self,
f: impl FnOnce(ComponentDefinitionAccess<Self>) -> F,
)
fn spawn_local<F>( &mut self, f: impl FnOnce(ComponentDefinitionAccess<Self>) -> F, )
Run a Future on this component, allowing it mutable
access to the component’s internal state on every poll. Read more
Source§impl ComponentLifecycle for TestComponent1
impl ComponentLifecycle for TestComponent1
Source§fn on_start(&mut self) -> HandlerResultwhere
Self: 'static,
fn on_start(&mut self) -> HandlerResultwhere
Self: 'static,
Gets invoked every time a component receives a Start event Read more
Source§fn on_stop(&mut self) -> HandlerResultwhere
Self: 'static,
fn on_stop(&mut self) -> HandlerResultwhere
Self: 'static,
Gets invoked every time a component receives a Stop event Read more
Source§fn on_kill(&mut self) -> HandlerResultwhere
Self: 'static,
fn on_kill(&mut self) -> HandlerResultwhere
Self: 'static,
Gets invoked every time a component receives a Kill event Read more
Source§impl DynamicPortAccess for TestComponent1
impl DynamicPortAccess for TestComponent1
Source§fn get_provided_port_as_any(&mut self, port_id: TypeId) -> Option<&mut dyn Any>
fn get_provided_port_as_any(&mut self, port_id: TypeId) -> Option<&mut dyn Any>
Internal API. Dynamically obtain a mutable reference to a
ProvidedPort if self
provides a port of the type indicated by the passed port_id. Read moreSource§fn get_required_port_as_any(&mut self, port_id: TypeId) -> Option<&mut dyn Any>
fn get_required_port_as_any(&mut self, port_id: TypeId) -> Option<&mut dyn Any>
Internal API. Dynamically obtain a mutable reference to a
RequiredPort if self
requires a port of the type indicated by the passed port_id. Read moreSource§impl Provide<TestPort> for TestComponent1
impl Provide<TestPort> for TestComponent1
Source§impl ProvideRef<TestPort> for TestComponent1
impl ProvideRef<TestPort> for TestComponent1
Source§fn provided_ref(&mut self) -> ProvidedRef<TestPort>
fn provided_ref(&mut self) -> ProvidedRef<TestPort>
Returns a provided reference to this component’s port instance of type
PSource§fn connect_to_required(&mut self, req: RequiredRef<TestPort>)
fn connect_to_required(&mut self, req: RequiredRef<TestPort>)
Connects this component’s provided port instance of type
P to reqSource§fn disconnect(&mut self, req: RequiredRef<TestPort>)
fn disconnect(&mut self, req: RequiredRef<TestPort>)
Disconnects this component’s provided port instance of type
P from reqAuto Trait Implementations§
impl !Freeze for TestComponent1
impl !RefUnwindSafe for TestComponent1
impl !Sync for TestComponent1
impl !UnwindSafe for TestComponent1
impl Forget for TestComponent1
impl Move for TestComponent1
impl Send for TestComponent1
impl Unpin for TestComponent1
impl UnsafeUnpin for TestComponent1
Blanket Implementations§
Source§impl<CD> ActorRefFactory for CDwhere
CD: ComponentDefinition,
impl<CD> ActorRefFactory for CDwhere
CD: ComponentDefinition,
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
Source§impl<CD> ComponentLogging for CDwhere
CD: ComponentTraits + ComponentLifecycle,
impl<CD> ComponentLogging for CDwhere
CD: ComponentTraits + ComponentLifecycle,
impl<CD> ComponentTraits for CDwhere
CD: ComponentDefinition + ActorRaw + 'static,
impl<T> DynamicComponentDefinition for T
impl<T> Erased for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CD> Timer<CD> for CDwhere
CD: ComponentTraits,
impl<CD> Timer<CD> for CDwhere
CD: ComponentTraits,
Source§fn schedule_once<F>(&mut self, timeout: Duration, action: F) -> ScheduledTimer
fn schedule_once<F>(&mut self, timeout: Duration, action: F) -> ScheduledTimer
Source§fn schedule_periodic<F>(
&mut self,
delay: Duration,
period: Duration,
action: F,
) -> ScheduledTimer
fn schedule_periodic<F>( &mut self, delay: Duration, period: Duration, action: F, ) -> ScheduledTimer
Source§fn cancel_timer(&mut self, handle: ScheduledTimer)
fn cancel_timer(&mut self, handle: ScheduledTimer)
Cancel the timer indicated by the
handle Read more