<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Span/BorrowingIterator",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s4SpanVsRi_zrlE17BorrowingIteratorV"
  },
  "title" : "Span.BorrowingIterator"
}
-->

# Span.BorrowingIterator

A type that provides the sequence’s iteration interface and
encapsulates its iteration state.

```
@frozen struct BorrowingIterator
```

## Topics

### Initializers

[`init(Span<Element>)`](/documentation/Swift/Span/BorrowingIterator/init(_:))

### Instance Methods

[`func nextSpan(maxCount: Int) -> Span<Element>`](/documentation/Swift/Span/BorrowingIterator/nextSpan(maxCount:))

Returns a span over the next group of elements that are ready to by visited,
up to the specifed maximum.

[`func skip(by: Int) -> Int`](/documentation/Swift/Span/BorrowingIterator/skip(by:))

Advances the position of this iterator by the specified offset, or until
the end of the underlying type’s elements.

### Type Aliases

[`typealias Failure`](/documentation/Swift/Span/BorrowingIterator/Failure)

### Default Implementations

[BorrowingIteratorProtocol Implementations](/documentation/Swift/Span/BorrowingIterator/BorrowingIteratorProtocol-Implementations)

## Relationships

### Conforms To

[`BorrowingIteratorProtocol`](/documentation/Swift/BorrowingIteratorProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)