Location

Trait Location 

Source
pub trait Location<'a>: Clone {
    type Root: Location<'a>;

Show 19 methods // Required methods fn root(&self) -> Self::Root; fn id(&self) -> LocationId; fn flow_state(&self) -> &FlowState; fn is_top_level() -> bool; // Provided methods fn tick(&self) -> Tick<Self> where Self: NoTick { ... } fn next_node_id(&self) -> usize { ... } fn new_node_metadata<T>(&self) -> HydroIrMetadata { ... } fn spin(&self) -> Stream<(), Self, Unbounded, TotalOrder, ExactlyOnce> where Self: Sized + NoTick { ... } fn source_stream<T, E>( &self, e: impl QuotedWithContext<'a, E, Self>, ) -> Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce> where E: FuturesStream<Item = T> + Unpin, Self: Sized + NoTick { ... } fn source_iter<T, E>( &self, e: impl QuotedWithContext<'a, E, Self>, ) -> Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce> where E: IntoIterator<Item = T>, Self: Sized + NoTick { ... } fn source_cluster_members<C: 'a>( &self, cluster: &Cluster<'a, C>, ) -> KeyedStream<MemberId<C>, MembershipEvent, Self, Unbounded> where Self: Sized + NoTick { ... } fn source_external_bytes<L>( &self, from: &External<'_, L>, ) -> (ExternalBytesPort, Stream<Result<BytesMut>, Self, Unbounded, TotalOrder, ExactlyOnce>) where Self: Sized + NoTick { ... } fn source_external_bincode<L, T>( &self, from: &External<'_, L>, ) -> (ExternalBincodeSink<T>, Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>) where Self: Sized + NoTick, T: Serialize + DeserializeOwned { ... } fn bidi_external_many_bytes<L, T, Codec: Encoder<T> + Decoder>( &self, from: &External<'_, L>, port_hint: NetworkHint, ) -> (ExternalBytesPort<Many>, KeyedStream<u64, <Codec as Decoder>::Item, Self, Unbounded, TotalOrder, ExactlyOnce>, KeyedStream<u64, MembershipEvent, Self, Unbounded, TotalOrder, ExactlyOnce>, ForwardRef<'a, KeyedStream<u64, T, Self, Unbounded, NoOrder, ExactlyOnce>>) where Self: Sized + NoTick { ... } fn bidi_external_many_bincode<L, InT: DeserializeOwned, OutT: Serialize>( &self, from: &External<'_, L>, ) -> (ExternalBincodeBidi<InT, OutT, Many>, KeyedStream<u64, InT, Self, Unbounded, TotalOrder, ExactlyOnce>, KeyedStream<u64, MembershipEvent, Self, Unbounded, TotalOrder, ExactlyOnce>, ForwardRef<'a, KeyedStream<u64, OutT, Self, Unbounded, NoOrder, ExactlyOnce>>) where Self: Sized + NoTick { ... } fn singleton<T>( &self, e: impl QuotedWithContext<'a, T, Self>, ) -> Singleton<T, Self, Unbounded> where T: Clone, Self: Sized + NoTick { ... } fn source_interval( &self, interval: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, _nondet: NonDet, ) -> Stream<Instant, Self, Unbounded, TotalOrder, ExactlyOnce> where Self: Sized + NoTick { ... } fn source_interval_delayed( &self, delay: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, interval: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, _nondet: NonDet, ) -> Stream<Instant, Self, Unbounded, TotalOrder, ExactlyOnce> where Self: Sized + NoTick { ... } fn forward_ref<S>(&self) -> (ForwardRef<'a, S>, S) where S: CycleCollection<'a, ForwardRefMarker, Location = Self>, Self: NoTick { ... }
}

Required Associated Types§

Required Methods§

Source

fn root(&self) -> Self::Root

Source

fn id(&self) -> LocationId

Source

fn flow_state(&self) -> &FlowState

Source

fn is_top_level() -> bool

Provided Methods§

Source

fn tick(&self) -> Tick<Self>
where Self: NoTick,

Source

fn next_node_id(&self) -> usize

Source

fn new_node_metadata<T>(&self) -> HydroIrMetadata

Source

fn spin(&self) -> Stream<(), Self, Unbounded, TotalOrder, ExactlyOnce>
where Self: Sized + NoTick,

Source

fn source_stream<T, E>( &self, e: impl QuotedWithContext<'a, E, Self>, ) -> Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>
where E: FuturesStream<Item = T> + Unpin, Self: Sized + NoTick,

Source

fn source_iter<T, E>( &self, e: impl QuotedWithContext<'a, E, Self>, ) -> Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>
where E: IntoIterator<Item = T>, Self: Sized + NoTick,

Source

fn source_cluster_members<C: 'a>( &self, cluster: &Cluster<'a, C>, ) -> KeyedStream<MemberId<C>, MembershipEvent, Self, Unbounded>
where Self: Sized + NoTick,

Source

fn source_external_bytes<L>( &self, from: &External<'_, L>, ) -> (ExternalBytesPort, Stream<Result<BytesMut>, Self, Unbounded, TotalOrder, ExactlyOnce>)
where Self: Sized + NoTick,

Source

fn source_external_bincode<L, T>( &self, from: &External<'_, L>, ) -> (ExternalBincodeSink<T>, Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>)
where Self: Sized + NoTick, T: Serialize + DeserializeOwned,

Source

fn bidi_external_many_bytes<L, T, Codec: Encoder<T> + Decoder>( &self, from: &External<'_, L>, port_hint: NetworkHint, ) -> (ExternalBytesPort<Many>, KeyedStream<u64, <Codec as Decoder>::Item, Self, Unbounded, TotalOrder, ExactlyOnce>, KeyedStream<u64, MembershipEvent, Self, Unbounded, TotalOrder, ExactlyOnce>, ForwardRef<'a, KeyedStream<u64, T, Self, Unbounded, NoOrder, ExactlyOnce>>)
where Self: Sized + NoTick,

Source

fn bidi_external_many_bincode<L, InT: DeserializeOwned, OutT: Serialize>( &self, from: &External<'_, L>, ) -> (ExternalBincodeBidi<InT, OutT, Many>, KeyedStream<u64, InT, Self, Unbounded, TotalOrder, ExactlyOnce>, KeyedStream<u64, MembershipEvent, Self, Unbounded, TotalOrder, ExactlyOnce>, ForwardRef<'a, KeyedStream<u64, OutT, Self, Unbounded, NoOrder, ExactlyOnce>>)
where Self: Sized + NoTick,

Source

fn singleton<T>( &self, e: impl QuotedWithContext<'a, T, Self>, ) -> Singleton<T, Self, Unbounded>
where T: Clone, Self: Sized + NoTick,

Source

fn source_interval( &self, interval: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, _nondet: NonDet, ) -> Stream<Instant, Self, Unbounded, TotalOrder, ExactlyOnce>
where Self: Sized + NoTick,

Generates a stream with values emitted at a fixed interval, with each value being the current time (as an [tokio::time::Instant]).

The clock source used is monotonic, so elements will be emitted in increasing order.

§Non-Determinism

Because this stream is generated by an OS timer, it will be non-deterministic because each timestamp will be arbitrary.

Source

fn source_interval_delayed( &self, delay: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, interval: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, _nondet: NonDet, ) -> Stream<Instant, Self, Unbounded, TotalOrder, ExactlyOnce>
where Self: Sized + NoTick,

Generates a stream with values emitted at a fixed interval (with an initial delay), with each value being the current time (as an [tokio::time::Instant]).

The clock source used is monotonic, so elements will be emitted in increasing order.

§Non-Determinism

Because this stream is generated by an OS timer, it will be non-deterministic because each timestamp will be arbitrary.

Source

fn forward_ref<S>(&self) -> (ForwardRef<'a, S>, S)
where S: CycleCollection<'a, ForwardRefMarker, Location = Self>, Self: NoTick,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, C> Location<'a> for Cluster<'a, C>

Source§

type Root = Cluster<'a, C>

Source§

impl<'a, L> Location<'a> for Atomic<L>
where L: Location<'a>,

Source§

type Root = <L as Location<'a>>::Root

Source§

impl<'a, L> Location<'a> for Tick<L>
where L: Location<'a>,

Source§

type Root = <L as Location<'a>>::Root

Source§

impl<'a, P> Location<'a> for Process<'a, P>

Source§

type Root = Process<'a, P>