<!--
{
  "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/BorrowingIteratorAdapter/nextSpan()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s25BorrowingIteratorProtocolPsRi_zRi0_z7ElementRj_zrlE8nextSpans0F0VyADGy7FailureQzYKF::SYNTHESIZED::s:s24BorrowingIteratorAdapterV"
  },
  "title" : "nextSpan()"
}
-->

# nextSpan()

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

```
@export(implementation) mutating func nextSpan() throws(Self.Failure) -> Span<Self.Element>
```

---

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)