Skip to main content

NoopRuntimeHooks

Struct NoopRuntimeHooks 

Source
pub struct NoopRuntimeHooks;
Expand description

A RuntimeHooks that ignores every event — the default when a session installs no observer.

Trait Implementations§

Source§

impl Debug for NoopRuntimeHooks

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NoopRuntimeHooks

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl RuntimeHooks for NoopRuntimeHooks

Source§

fn env_connected<'life0, 'async_trait>( &'life0 self, _event: EnvConnectedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn model_connected<'life0, 'async_trait>( &'life0 self, _event: ModelConnectedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn session_started<'life0, 'async_trait>( &'life0 self, _event: SessionStartedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn episode_started<'life0, 'async_trait>( &'life0 self, _event: EpisodeStartedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn episode_completed<'life0, 'async_trait>( &'life0 self, _event: EpisodeCompletedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The last event under its episode id: no observation or step of that episode follows it. Under NEXT_STEP autoreset the ended episode is observed and stepped once more (the autoreset step) before this fires.
Source§

fn action_received<'life0, 'async_trait>( &'life0 self, _event: ActionReceivedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn transform_action<'life0, 'async_trait>( &'life0 self, event: ActionReceivedEvent, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Bytes>>, HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fatal hook: a failed transform leaves the next action payload undefined, so the route fails rather than send something undefined to the env.
Source§

fn step_completed<'life0, 'async_trait>( &'life0 self, _event: StepCompletedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observation_emitted<'life0, 'async_trait>( &'life0 self, _event: ObservationEmittedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn transform_observation<'life0, 'async_trait>( &'life0 self, event: ObservationEmittedEvent, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Bytes>>, HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fatal hook; see Self::transform_action.
Source§

fn session_ended<'life0, 'async_trait>( &'life0 self, _event: SessionEndedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn on_telemetry<'life0, 'async_trait>( &'life0 self, _event: TelemetrySnapshotEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Live telemetry push, best-effort. A background ticker streams a Window snapshot (the live tier, cleared each RuntimeLimits::telemetry_window) while the session runs; one final cumulative Session snapshot is delivered at session end (the durable tier, also returned on RuntimeReport.telemetry). Branch on event.snapshot.horizon for window vs session. Dispatched from a separate task, so this may run concurrently with the other hooks — do not assume serialized delivery.
Source§

fn session_failed<'life0, 'async_trait>( &'life0 self, _event: SessionFailedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn log<'life0, 'async_trait>( &'life0 self, _event: LogEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn relay_advisory<'life0, 'async_trait>( &'life0 self, _event: RelayAdvisoryEvent, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Best-effort; see RelayAdvisoryEvent.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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