<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetWritingPlanner/SegmentResult",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:So21AVAssetWritingPlannerC12AVFoundationE13SegmentResultO"
  },
  "title" : "AVAssetWritingPlanner.SegmentResult"
}
-->

# AVAssetWritingPlanner.SegmentResult

Result type for manual segment completion control.

```
enum SegmentResult
```

## Overview

Return this type from the segment handler to explicitly control how each segment completes,
including saving custom client state for resumable exports or canceling segments.

## Topics

### Completion Options

[`case success`](/documentation/AVFoundation/AVAssetWritingPlanner/SegmentResult/success)

Finish the segment successfully without saving state.

[`case successWithState(Data)`](/documentation/AVFoundation/AVAssetWritingPlanner/SegmentResult/successWithState(_:))

Finish the segment successfully with custom client state.

[`case cancelled`](/documentation/AVFoundation/AVAssetWritingPlanner/SegmentResult/cancelled)

Cancel the current segment while allowing future resumption.



---

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)