pub enum CycleOperand {
Indexed,
Streamed,
Buffered {
bound: Option<u64>,
},
}Expand description
How a zip(Cycle) holds one operand while it cycles (comprehension_forms.md §6.2,
§6.3).
Cycling re-emits an operand’s earlier tuples once it is exhausted
and a longer operand is not. An index-addressable operand is read
at i mod |operand| directly and holds nothing; one operand that
is not addressable streams, and is restarted when it runs out
before the zip does; every other operand that is not addressable
is buffered in full. An operand found empty empties the zip, so an
executor checks the indexed operands’ lengths and drains the
buffered operands in ascending bound before it holds any tuple,
and stops at the first empty one.
Variants§
Indexed
Read at i mod |operand| through its index function.
Streamed
Pulled once per tuple, and restarted when it runs out before the zip does.
Buffered
Held in full and replayed. A bound of zero marks an operand known empty: the executor drains it first and holds nothing.
Trait Implementations§
Source§impl Clone for CycleOperand
impl Clone for CycleOperand
Source§fn clone(&self) -> CycleOperand
fn clone(&self) -> CycleOperand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CycleOperand
impl Debug for CycleOperand
Source§impl<'de> Deserialize<'de> for CycleOperand
impl<'de> Deserialize<'de> for CycleOperand
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CycleOperand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CycleOperand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CycleOperand
Source§impl PartialEq for CycleOperand
impl PartialEq for CycleOperand
Source§impl Serialize for CycleOperand
impl Serialize for CycleOperand
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CycleOperand
Auto Trait Implementations§
impl Freeze for CycleOperand
impl RefUnwindSafe for CycleOperand
impl Send for CycleOperand
impl Sync for CycleOperand
impl Unpin for CycleOperand
impl UnsafeUnpin for CycleOperand
impl UnwindSafe for CycleOperand
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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