Struct Repeat
pub struct Repeat<T> { /* private fields */ }
Iterator adaptor for the repeat() function.
Implementations
impl<T> Repeat<T>
where
T: Clone + Send,
fn take(self, n: usize) -> RepeatN<T>Takes only
nrepeats of the element, similar to the generaltake().The resulting
RepeatNis anIndexedParallelIterator, allowing more functionality thanRepeatalone.fn zip<Z>(self, zip_op: Z) -> Zip<RepeatN<T>, Z::Iter> where Z: IntoParallelIterator<Iter: IndexedParallelIterator>,Iterates tuples, repeating the element with items from another iterator, similar to the general
zip().
Trait Implementations
impl<T> ParallelIterator for Repeat<T>
where
T: Clone + Send,
type Item = T;fn drive_unindexed<C>(self, consumer: C) -> C::Result where C: UnindexedConsumer<Self::Item>,
impl<T: Clone> Clone for Repeat<T>
fn clone(&self) -> Self
impl<T: Debug> Debug for Repeat<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<T> Freeze for Repeat<T>
where
T: Freeze,
impl<T> RefUnwindSafe for Repeat<T>
where
T: RefUnwindSafe,
impl<T> Send for Repeat<T>
where
T: Send,
impl<T> Sync for Repeat<T>
where
T: Sync,
impl<T> Unpin for Repeat<T>
where
T: Unpin,
impl<T> UnsafeUnpin for Repeat<T>
where
T: UnsafeUnpin,
impl<T> UnwindSafe for Repeat<T>
where
T: UnwindSafe,
Blanket Implementations
impl<T> Any for Repeat<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Repeat<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Repeat<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Repeat<T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Repeat<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for Repeat<T>
impl<T> IntoParallelIterator for Repeat<T>
where
T: ParallelIterator,
type Iter = T;type Item = <T as ParallelIterator>::Item;fn into_par_iter(self) -> T
impl<T> Pointable for Repeat<T>
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> ToOwned for Repeat<T>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Repeat<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Repeat<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Repeat<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>