Skip to main content

OutStepContext

Struct OutStepContext 

Source
pub struct OutStepContext<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T>
where OutP: Payload, C: PlatformClock + Sized, T: Telemetry + Sized,
{ /* private fields */ }
Expand description

A StepContext view that only exposes outputs / managers / clock / telemetry.

Explicitly does not provide access to input queues or input managers.

Implementations§

Source§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>
where OutP: Payload, OutQ: Edge, OutM: MemoryManager<OutP>, C: PlatformClock + Sized, T: Telemetry + Sized,

Source

pub fn out_try_push(&mut self, o: usize, m: Message<OutP>) -> EnqueueResult

Push a message to an output queue via the memory manager.

Stores the message in the manager, pushes the token to the edge, and handles eviction (frees evicted tokens from the manager).

Source

pub fn out_occupancy(&mut self, o: usize) -> EdgeOccupancy

Snapshot occupancy for the given output edge.

Source

pub fn out_policy(&mut self, o: usize) -> EdgePolicy

Return the policy for the given output (copy).

Source

pub fn clock(&self) -> &C

Access the platform clock.

Source

pub fn telemetry_mut(&mut self) -> &mut T

Borrow the telemetry sink.

Source

pub fn now_ticks(&self) -> Ticks

Current monotonic tick value.

Source

pub fn now_nanos(&self) -> u64

Current time in nanoseconds.

Source

pub fn ticks_to_nanos(&self, t: Ticks) -> u64

Convert clock ticks to nanoseconds.

Source

pub fn nanos_to_ticks(&self, ns: u64) -> Ticks

Convert nanoseconds to clock ticks.

Auto Trait Implementations§

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> Freeze for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> RefUnwindSafe for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> Send for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>
where C: Sync, T: Send, OutP: Send, OutQ: Send, OutM: Send,

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> Sync for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>
where C: Sync, T: Sync, OutP: Sync, OutQ: Sync, OutM: Sync,

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> Unpin for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>
where OutP: Unpin,

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> UnsafeUnpin for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>

§

impl<'graph, 'ctx, 'clock, const OUT: usize, OutP, OutQ, OutM, C, T> !UnwindSafe for OutStepContext<'graph, 'ctx, 'clock, OUT, OutP, OutQ, OutM, C, T>

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, 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.