Struct ByRefSized

struct ByRefSized<'a, I>(24952)

Like Iterator::by_ref, but requiring Sized so it can forward generics.

Ideally this will no longer be required, eventually, but as can be seen in the benchmarks (as of Feb 2022 at least) by_ref can have performance cost.

Implementations

impl<'a, I> Freeze for ByRefSized<'a, I>

impl<'a, I> RefUnwindSafe for ByRefSized<'a, I>

impl<'a, I> Send for ByRefSized<'a, I>

impl<'a, I> Sync for ByRefSized<'a, I>

impl<'a, I> Unpin for ByRefSized<'a, I>

impl<'a, I> UnsafeUnpin for ByRefSized<'a, I>

impl<'a, I> UnwindSafe for ByRefSized<'a, I>

impl<'a, I: $crate::fmt::Debug> Debug for ByRefSized<'a, I>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<I> IntoIterator for ByRefSized<'a, I>

fn into_iter(self: Self) -> I

impl<I: DoubleEndedIterator> DoubleEndedIterator for ByRefSized<'_, I>

fn next_back(self: &mut Self) -> Option<<Self as >::Item>
fn advance_back_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>
fn nth_back(self: &mut Self, n: usize) -> Option<<Self as >::Item>
fn rfold<B, F>(self: Self, init: B, f: F) -> B
where
    F: FnMut(B, <Self as >::Item) -> B
fn try_rfold<B, F, R>(self: &mut Self, init: B, f: F) -> R
where
    F: FnMut(B, <Self as >::Item) -> R,
    R: Try<Output = B>

impl<I: Iterator> Iterator for ByRefSized<'_, I>

fn next(self: &mut Self) -> Option<<Self as >::Item>
fn size_hint(self: &Self) -> (usize, Option<usize>)
fn advance_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>
fn nth(self: &mut Self, n: usize) -> Option<<Self as >::Item>
fn fold<B, F>(self: Self, init: B, f: F) -> B
where
    F: FnMut(B, <Self as >::Item) -> B
fn try_fold<B, F, R>(self: &mut Self, init: B, f: F) -> R
where
    F: FnMut(B, <Self as >::Item) -> R,
    R: Try<Output = B>

impl<T> Any for ByRefSized<'a, I>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ByRefSized<'a, I>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ByRefSized<'a, I>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for ByRefSized<'a, I>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for ByRefSized<'a, I>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ByRefSized<'a, I>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ByRefSized<'a, I>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>