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§
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>
fn source_stream<T, E>( &self, e: impl QuotedWithContext<'a, E, Self>, ) -> Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>
fn source_iter<T, E>( &self, e: impl QuotedWithContext<'a, E, Self>, ) -> Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>
fn source_cluster_members<C: 'a>( &self, cluster: &Cluster<'a, C>, ) -> KeyedStream<MemberId<C>, MembershipEvent, Self, Unbounded>
fn source_external_bytes<L>( &self, from: &External<'_, L>, ) -> (ExternalBytesPort, Stream<Result<BytesMut>, Self, Unbounded, TotalOrder, ExactlyOnce>)
fn source_external_bincode<L, T>( &self, from: &External<'_, L>, ) -> (ExternalBincodeSink<T>, Stream<T, Self, Unbounded, TotalOrder, ExactlyOnce>)
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>>)
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>>)
fn singleton<T>( &self, e: impl QuotedWithContext<'a, T, Self>, ) -> Singleton<T, Self, Unbounded>
Sourcefn source_interval(
&self,
interval: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a,
_nondet: NonDet,
) -> Stream<Instant, Self, Unbounded, TotalOrder, ExactlyOnce>
fn source_interval( &self, interval: impl QuotedWithContext<'a, Duration, Self> + Copy + 'a, _nondet: NonDet, ) -> Stream<Instant, Self, Unbounded, TotalOrder, ExactlyOnce>
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.
Sourcefn 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>
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>
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.
fn forward_ref<S>(&self) -> (ForwardRef<'a, S>, S)
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.