pub struct OperatorContext<L, B>(/* private fields */);Expand description
The context type for quoted closures (q!(...)) passed to operators on live collections.
This bundles the crate::location::Location where the collection is materialized
with a marker for the boundedness::Boundedness of the collection the closure operates on.
Free variables captured inside such closures can constrain both components. For example,
reference handles created via by_ref() / by_mut() (see crate::handoff_ref) require
that both the location and the boundedness of the referenced collection match those of the
collection whose operator captures the reference. This prevents, e.g., a reference to a
boundedness::Bounded singleton from being accessed inside a map over an
boundedness::Unbounded stream: the singleton is only materialized on the first tick,
while the closure keeps running on later ticks, where accessing the reference would crash.
Trait Implementations§
Source§impl<'a, L: Location<'a>, B> ContextWithLocation<'a> for OperatorContext<L, B>
impl<'a, L: Location<'a>, B> ContextWithLocation<'a> for OperatorContext<L, B>
Source§impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for SingletonRef<'a, 'slf, T, L, B>where
L: Location<'a>,
impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for SingletonRef<'a, 'slf, T, L, B>where
L: Location<'a>,
Source§impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for SingletonMut<'a, 'slf, T, L, B>where
L: Location<'a>,
impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for SingletonMut<'a, 'slf, T, L, B>where
L: Location<'a>,
Source§impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for OptionalRef<'a, 'slf, T, L, B>where
L: Location<'a>,
impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for OptionalRef<'a, 'slf, T, L, B>where
L: Location<'a>,
Source§impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for OptionalMut<'a, 'slf, T, L, B>where
L: Location<'a>,
impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for OptionalMut<'a, 'slf, T, L, B>where
L: Location<'a>,
Source§impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for StreamRef<'a, 'slf, T, L, B>where
L: Location<'a>,
impl<'a, 'slf, T: 'a, L, B> FreeVariableWithContextWithProps<OperatorContext<L, B>, ()> for StreamRef<'a, 'slf, T, L, B>where
L: Location<'a>,
Auto Trait Implementations§
impl<L, B> Freeze for OperatorContext<L, B>where
L: Freeze,
impl<L, B> RefUnwindSafe for OperatorContext<L, B>where
L: RefUnwindSafe,
B: RefUnwindSafe,
impl<L, B> Send for OperatorContext<L, B>
impl<L, B> Sync for OperatorContext<L, B>
impl<L, B> Unpin for OperatorContext<L, B>
impl<L, B> UnsafeUnpin for OperatorContext<L, B>where
L: UnsafeUnpin,
impl<L, B> UnwindSafe for OperatorContext<L, B>where
L: UnwindSafe,
B: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more