pub struct OptIter<'a, V: Vec1View<T>, T> {
pub view: &'a V,
pub item: PhantomData<T>,
}Fields§
§view: &'a V§item: PhantomData<T>Trait Implementations§
source§impl<'a, V: Vec1View<T>, T: IsNone + 'a> Slice<Option<<T as IsNone>::Inner>> for OptIter<'a, V, T>
impl<'a, V: Vec1View<T>, T: IsNone + 'a> Slice<Option<<T as IsNone>::Inner>> for OptIter<'a, V, T>
source§impl<'a, T: IsNone + 'a, V: Vec1View<T>> Vec1View<Option<<T as IsNone>::Inner>> for OptIter<'a, V, T>
impl<'a, T: IsNone + 'a, V: Vec1View<T>> Vec1View<Option<<T as IsNone>::Inner>> for OptIter<'a, V, T>
fn try_as_slice(&self) -> Option<&[T]>
fn iter_cast<'a, U>(&'a self) -> TrustIter<impl TIterator<Item = U>> ⓘwhere
T: 'a + Cast<U>,
fn opt_iter_cast<'a, U>(&'a self) -> TrustIter<impl TIterator<Item = Option<U>>> ⓘ
fn opt(&self) -> OptIter<'_, Self, T>
fn to_opt_iter<'a>(
&'a self,
) -> TrustIter<impl TIterator<Item = Option<T::Inner>>> ⓘwhere
T: IsNone + 'a,
source§unsafe fn uvget(&self, index: usize) -> Option<T::Inner>where
T: IsNone,
unsafe fn uvget(&self, index: usize) -> Option<T::Inner>where
T: IsNone,
if the value is valid, return it, otherwise return None Read more
fn get(&self, index: usize) -> TResult<T>
fn vget(&self, index: usize) -> Option<T::Inner>where
T: IsNone,
source§fn rolling_custom_iter<U, F>(
&self,
window: usize,
f: F,
) -> impl TrustedLen<Item = U>
fn rolling_custom_iter<U, F>( &self, window: usize, f: F, ) -> impl TrustedLen<Item = U>
Rolling and apply a custom funtion to each window, but it won’t collect result
source§fn rolling_custom<O: Vec1<OT>, OT: Clone, F>(
&self,
window: usize,
f: F,
out: Option<O::UninitRefMut<'_>>,
) -> Option<O>
fn rolling_custom<O: Vec1<OT>, OT: Clone, F>( &self, window: usize, f: F, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
Rolling and apply a custom funtion to each window
source§fn rolling2_custom<O: Vec1<OT>, OT: Clone, V2, T2, F>(
&self,
other: &V2,
window: usize,
f: F,
out: Option<O::UninitRefMut<'_>>,
) -> Option<O>
fn rolling2_custom<O: Vec1<OT>, OT: Clone, V2, T2, F>( &self, other: &V2, window: usize, f: F, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
Rolling and apply a custom funtion to each window of two vecs
source§fn rolling_apply<O: Vec1<OT>, OT, F>(
&self,
window: usize,
f: F,
out: Option<O::UninitRefMut<'_>>,
) -> Option<O>
fn rolling_apply<O: Vec1<OT>, OT, F>( &self, window: usize, f: F, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
Rolling and apply a function, the function accept whether to
move element from the window and a value to be added to
the window
source§fn rolling_apply_to<O: Vec1<OT>, OT, F>(
&self,
window: usize,
f: F,
out: O::UninitRefMut<'_>,
)
fn rolling_apply_to<O: Vec1<OT>, OT, F>( &self, window: usize, f: F, out: O::UninitRefMut<'_>, )
Rolling and apply a function, the function accept whether to
move element from the window and a value to be added to
the window. Read more
source§fn rolling2_apply<O: Vec1<OT>, OT, V2: Vec1View<T2>, T2, F>(
&self,
other: &V2,
window: usize,
f: F,
out: Option<O::UninitRefMut<'_>>,
) -> Option<O>
fn rolling2_apply<O: Vec1<OT>, OT, V2: Vec1View<T2>, T2, F>( &self, other: &V2, window: usize, f: F, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
Rolling and apply a function to both vecs, the function accept whether to
move element from the window and a value to be added to
the window
source§fn rolling2_apply_to<O: Vec1<OT>, OT, V2: Vec1View<T2>, T2, F>(
&self,
other: &V2,
window: usize,
f: F,
out: O::UninitRefMut<'_>,
)
fn rolling2_apply_to<O: Vec1<OT>, OT, V2: Vec1View<T2>, T2, F>( &self, other: &V2, window: usize, f: F, out: O::UninitRefMut<'_>, )
Rolling and apply a function to both vecs, the function accept whether to
move element from the window and a value to be added to
the window. Read more
fn rolling_apply_idx<O: Vec1<OT>, OT, F>( &self, window: usize, f: F, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
source§fn rolling_apply_idx_to<O: Vec1<OT>, OT, F>(
&self,
window: usize,
f: F,
out: O::UninitRefMut<'_>,
)
fn rolling_apply_idx_to<O: Vec1<OT>, OT, F>( &self, window: usize, f: F, out: O::UninitRefMut<'_>, )
be careful to use this function as it will panic in polars backend.
use rolling_apply_idx instead
fn rolling2_apply_idx<O: Vec1<OT>, OT, V2: Vec1View<T2>, T2, F>( &self, other: &V2, window: usize, f: F, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
Auto Trait Implementations§
impl<'a, V, T> Freeze for OptIter<'a, V, T>
impl<'a, V, T> RefUnwindSafe for OptIter<'a, V, T>where
V: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, V, T> Send for OptIter<'a, V, T>
impl<'a, V, T> Sync for OptIter<'a, V, T>
impl<'a, V, T> Unpin for OptIter<'a, V, T>where
T: Unpin,
impl<'a, V, T> UnwindSafe for OptIter<'a, V, T>where
V: RefUnwindSafe,
T: 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
Mutably borrows from an owned value. Read more