Skip to main content

NoopComponent

Struct NoopComponent 

Source
pub struct NoopComponent { /* private fields */ }
Expand description

Minimal Component that does nothing but satisfy the 1:1 Channel binding.

§Example

use orcs_runtime::components::NoopComponent;

let component = NoopComponent::new("io");
engine.spawn_runner(channel_id, Box::new(component));

Implementations§

Source§

impl NoopComponent

Source

pub fn new(name: &str) -> Self

Creates a new NoopComponent with the given name.

Trait Implementations§

Source§

impl Component for NoopComponent

Source§

fn id(&self) -> &ComponentId

Returns the component’s identifier. Read more
Source§

fn subscriptions(&self) -> &[EventCategory]

Returns the event categories this component subscribes to. Read more
Source§

fn status(&self) -> Status

Returns the current execution status. Read more
Source§

fn on_request(&mut self, request: &Request) -> Result<Value, ComponentError>

Handle an incoming request. Read more
Source§

fn on_signal(&mut self, signal: &Signal) -> SignalResponse

Handle an incoming signal. Read more
Source§

fn abort(&mut self)

Immediate abort. Read more
Source§

fn subscription_entries(&self) -> Vec<SubscriptionEntry>

Returns subscription entries with optional operation-level filtering. Read more
Source§

fn status_detail(&self) -> Option<StatusDetail>

Returns detailed status information. Read more
Source§

fn init(&mut self, _config: &Value) -> Result<(), ComponentError>

Initialize the component with optional configuration. Read more
Source§

fn shutdown(&mut self)

Shutdown the component. Read more
Source§

fn runtime_hints(&self) -> RuntimeHints

Returns runtime hints for this component. Read more
Source§

fn as_packageable(&self) -> Option<&dyn Packageable>

Returns this component as a Packageable if supported. Read more
Source§

fn as_packageable_mut(&mut self) -> Option<&mut dyn Packageable>

Returns this component as a mutable Packageable if supported. Read more
Source§

fn set_emitter(&mut self, _emitter: Box<dyn Emitter>)

Sets the event emitter for this component. Read more
Source§

fn set_child_context(&mut self, _ctx: Box<dyn ChildContext>)

Sets the child context for this component. Read more
Source§

fn snapshot(&self) -> Result<ComponentSnapshot, SnapshotError>

Captures the component’s current state as a snapshot. Read more
Source§

fn restore( &mut self, _snapshot: &ComponentSnapshot, ) -> Result<(), SnapshotError>

Restores the component’s state from a snapshot. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more