Skip to main content

LoopEvalSite

Struct LoopEvalSite 

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

An eval site that repeatedly runs its pipeline steps – up to max_iterations times – until the until predicate fires on a reply.

Implementations§

Source§

impl LoopEvalSite

Source

pub fn new( address: ServerAddress, codecs: Vec<Symbol>, steps: Vec<Connection>, max_iterations: usize, until: Value, ) -> Self

Creates a loop site answering at address over codecs, running steps at most max_iterations times or until until fires.

Trait Implementations§

Source§

impl Clone for LoopEvalSite

Source§

fn clone(&self) -> LoopEvalSite

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl EvalSite for LoopEvalSite

Source§

fn site_kind(&self) -> &'static str

Returns a short label naming the kind of site.
Source§

fn address(&self) -> &ServerAddress

Returns the address this site answers at.
Source§

fn codecs(&self) -> &[Symbol]

Returns the codecs this site can decode and encode.
Source§

fn answer(&self, cx: &mut Cx, frame: ServerFrame) -> Result<ServerFrame>

Answers frame, returning the reply frame.
Source§

fn as_any(&self) -> &dyn Any

Returns the site as &dyn Any for downcasting.
Source§

fn answer_with_timeout( &self, cx: &mut Cx, frame: ServerFrame, _timeout: Option<Duration>, ) -> Result<ServerFrame>

Answers frame with an optional deadline. Defaults to EvalSite::answer.
Source§

fn close_connection(&self, _cx: &mut Cx) -> Result<()>

Closes any connection backing the site. Defaults to a no-op.
Source§

fn stream( &self, cx: &mut Cx, frame: ServerFrame, sink: &mut dyn StreamSink, ) -> Result<()>

Streams the answer to frame into sink. The default path answers once and emits a single chunk followed by end.
Source§

fn as_eval_fabric(&self) -> Option<&dyn EvalFabric>

Returns this site as an EvalFabric when it backs one. Defaults to None.
Source§

impl Site for LoopEvalSite

Source§

fn kind(&self) -> SiteKind

Returns the SiteKind of this site.
Source§

fn run_fragment( &self, cx: &mut Cx, fragment: &PlacedFragment, ) -> Result<Vec<StreamEnvelope>>

Realizes fragment: feeds its input edges, evaluates its node, and emits a result envelope per output edge.
Source§

fn realize_fragment_node( &self, cx: &mut Cx, fragment: &PlacedFragment, ) -> Result<EvalReply>

Evaluates the fragment’s node and returns its reply, with no deadline.
Source§

fn realize_fragment_node_with_timeout( &self, cx: &mut Cx, fragment: &PlacedFragment, timeout: Option<Duration>, ) -> Result<EvalReply>

Evaluates the fragment’s node and returns its reply, honoring timeout.
Source§

impl StreamEndpoint for LoopEvalSite

Source§

fn endpoint_id(&self) -> Symbol

Returns the endpoint’s stable identifier.
Source§

fn endpoint_kind(&self) -> StreamEndpointKind

Returns the role this endpoint plays.
Source§

fn clock_domain(&self) -> ClockDomain

Returns the clock domain this endpoint runs in.
Source§

fn latency_class(&self) -> LatencyClass

Returns the latency class this endpoint targets.
Source§

fn accept_input_edges(&self, edges: &[StreamEdge]) -> Result<(), Error>

Validates that each input edge’s clock domain matches this endpoint. Read more
Source§

fn output_envelopes( &self, fragment: &PlacedFragment, ) -> Result<Vec<StreamEnvelope>, Error>

Returns the envelopes this endpoint emits for fragment. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.