pub trait StreamEndpoint: Send + Sync {
// Required methods
fn endpoint_id(&self) -> Symbol;
fn endpoint_kind(&self) -> StreamEndpointKind;
fn clock_domain(&self) -> ClockDomain;
fn latency_class(&self) -> LatencyClass;
// Provided methods
fn accept_input_edges(&self, edges: &[StreamEdge]) -> Result<()> { ... }
fn output_envelopes(
&self,
fragment: &PlacedFragment,
) -> Result<Vec<StreamEnvelope>> { ... }
}Expand description
A site that produces, consumes, or routes a stream.
An endpoint declares its identity, kind, clock domain, and latency class, and accepts input edges whose rate contracts must agree with its clock domain. Implementors supply the concrete placement behavior; the default methods enforce the clock-domain contract and surface a fragment’s output envelopes.
Required Methods§
Sourcefn endpoint_id(&self) -> Symbol
fn endpoint_id(&self) -> Symbol
Returns the endpoint’s stable identifier.
Sourcefn endpoint_kind(&self) -> StreamEndpointKind
fn endpoint_kind(&self) -> StreamEndpointKind
Returns the role this endpoint plays.
Sourcefn clock_domain(&self) -> ClockDomain
fn clock_domain(&self) -> ClockDomain
Returns the clock domain this endpoint runs in.
Sourcefn latency_class(&self) -> LatencyClass
fn latency_class(&self) -> LatencyClass
Returns the latency class this endpoint targets.
Provided Methods§
Sourcefn accept_input_edges(&self, edges: &[StreamEdge]) -> Result<()>
fn accept_input_edges(&self, edges: &[StreamEdge]) -> Result<()>
Validates that each input edge’s clock domain matches this endpoint.
Returns an error naming the first edge whose rate-contract clock domain
differs from clock_domain.
Sourcefn output_envelopes(
&self,
fragment: &PlacedFragment,
) -> Result<Vec<StreamEnvelope>>
fn output_envelopes( &self, fragment: &PlacedFragment, ) -> Result<Vec<StreamEnvelope>>
Returns the envelopes this endpoint emits for fragment.
Defaults to the fragment’s own output envelopes; endpoints that transform the stream override this.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".