pub struct StreamEdge { /* private fields */ }Expand description
A typed, rate-contracted port carrying envelopes between sites.
An edge names its port, the RateContract (and thus clock domain) it must
honor, the stream StreamMetadata flowing across it, and any envelopes
already buffered on it.
Implementations§
Source§impl StreamEdge
impl StreamEdge
Sourcepub fn new(
port: Symbol,
rate_contract: RateContract,
metadata: StreamMetadata,
) -> Self
pub fn new( port: Symbol, rate_contract: RateContract, metadata: StreamMetadata, ) -> Self
Creates an empty edge for port under the given rate contract and
metadata.
Sourcepub fn with_envelopes(self, envelopes: Vec<StreamEnvelope>) -> Self
pub fn with_envelopes(self, envelopes: Vec<StreamEnvelope>) -> Self
Returns the edge with its buffered envelopes replaced.
Sourcepub fn rate_contract(&self) -> RateContract
pub fn rate_contract(&self) -> RateContract
Returns the rate contract this edge must honor.
Sourcepub fn metadata(&self) -> &StreamMetadata
pub fn metadata(&self) -> &StreamMetadata
Returns the metadata of the stream flowing across this edge.
Sourcepub fn envelopes(&self) -> &[StreamEnvelope]
pub fn envelopes(&self) -> &[StreamEnvelope]
Returns the envelopes currently buffered on this edge.
Sourcepub fn result_envelope(
&self,
sequence: u64,
payload: Expr,
) -> Result<StreamEnvelope>
pub fn result_envelope( &self, sequence: u64, payload: Expr, ) -> Result<StreamEnvelope>
Builds a site-result data envelope for this edge.
Wraps payload in a stream/data packet sequenced at sequence under
a memory-local transport profile, using this edge’s metadata.
Trait Implementations§
Source§impl Clone for StreamEdge
impl Clone for StreamEdge
Source§fn clone(&self) -> StreamEdge
fn clone(&self) -> StreamEdge
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamEdge
impl Debug for StreamEdge
impl Eq for StreamEdge
Source§impl PartialEq for StreamEdge
impl PartialEq for StreamEdge
Source§fn eq(&self, other: &StreamEdge) -> bool
fn eq(&self, other: &StreamEdge) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamEdge
Auto Trait Implementations§
impl Freeze for StreamEdge
impl RefUnwindSafe for StreamEdge
impl Send for StreamEdge
impl Sync for StreamEdge
impl Unpin for StreamEdge
impl UnsafeUnpin for StreamEdge
impl UnwindSafe for StreamEdge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more