---
title: "init(from:)"
framework: os
role: symbol
role_heading: Initializer
path: "os/ossignpostintervalstate/init(from:)"
---

# init(from:)

Decodes the interval state from the provided decoder.

## Declaration

```swift
required init(from decoder: any Decoder) throws
```

## Parameters

- `decoder`: The decoder to read data from.

## Discussion

Discussion important: You don’t call this method directly. Instead, the object you’re using to decode the interval state, which must adopt the Decoder protocol, calls it on your behalf as part of the serialization process. The initializer throws an error if reading from the decoder fails, or if the decoder’s data is corrupt or invalid.
