saveBuffer
Saves the current buffer contents and waits for completion.
Declaration
func saveBuffer(timeout: Double = 30.0, pollingInterval: TimeInterval = 0.5) async throws -> SaveResult
Summary
Returns
The SaveResult containing the save path on success.
Throws
- -
NSDKError.invalidOperationif the buffer is empty. -TimeoutErrorif the save does not complete within the timeout. -CancellationErrorif the running Task is cancelled. -SaveError.saveFailedif the native save operation failed.
Parameters
| Name | Type | Summary |
|---|---|---|
| timeout | Double | Maximum duration in seconds to wait (default 30 seconds). |
| pollingInterval | TimeInterval | Interval in seconds between progress checks (default 0.5 seconds). |
Saves the current buffer contents and waits for completion.