class ByRef

Declaration

template <class RefIterator>
class ByRef { /* full declaration omitted */ };

Description

An iterator that holds a reference to another iterator and proxies calls through to it. Used to create multiple iterators that share underlying state. The ByRef class must outlive the iterator it refers to. This type is returned from `Iterator::by_ref()`.

Declared at: sus/iter/adaptors/by_ref.h:34

Templates

RefIterator

Method Overview

  • public ByRef<RefIterator>(ByRef<RefIterator> &&)
  • public constexpr ByRef<RefIterator> clone() const noexcept
  • public constexpr sus::num::usize exact_size_hint() const noexcept
  • public constexpr Option<sus::iter::ByRef::Item> next() noexcept
  • public constexpr Option<sus::iter::ByRef::Item> next_back() noexcept
  • public constexpr sus::iter::SizeHint size_hint() const noexcept
  • public constexpr ::sus::iter::__private::TrustedLenMarker trusted_len() const noexcept
  • public constexpr ~ByRef<RefIterator>() noexcept

Methods

ByRef<RefIterator>(ByRef<RefIterator>&&)

Declared at: sus/iter/adaptors/by_ref.h:40

Parameters

ByRef<RefIterator>&&

constexpr ByRef<RefIterator> clone()
    const noexcept

Declared at: sus/iter/adaptors/by_ref.h:44

constexpr sus::num::usize exact_size_hint()
    const noexcept

Description

sus::iter::ExactSizeIterator trait.

Declared at: sus/iter/adaptors/by_ref.h:62

constexpr Option<sus::iter::ByRef::Item>
next() noexcept

Description

sus::iter::Iterator trait.

Declared at: sus/iter/adaptors/by_ref.h:47

constexpr Option<sus::iter::ByRef::Item>
next_back() noexcept

Description

sus::iter::DoubleEndedIterator trait.

Declared at: sus/iter/adaptors/by_ref.h:55

constexpr sus::iter::SizeHint size_hint()
    const noexcept

Description

sus::iter::Iterator trait.

Declared at: sus/iter/adaptors/by_ref.h:50

constexpr ::sus::iter::__private::TrustedLenMarker
trusted_len() const noexcept

Description

sus::iter::TrustedLen trait.

Declared at: sus/iter/adaptors/by_ref.h:69

constexpr ~ByRef<RefIterator>() noexcept

Declared at: sus/iter/adaptors/by_ref.h:76