---
title: "encodeWithOptimizer(_:to:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/temporaltransformertoupdatableestimatoradaptor/encodewithoptimizer(_:to:)"
---

# encodeWithOptimizer(_:to:)

This method is part of the conformance. It doesn’t encode anything since the transformer is pre-defined, so don’t call it.

## Declaration

```swift
func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any EstimatorEncoder) throws
```

## See Also

### Encoding and decoding

- [encode(_:to:)](createmlcomponents/temporaltransformertoupdatableestimatoradaptor/encode(_:to:).md)
- [decode(from:)](createmlcomponents/temporaltransformertoupdatableestimatoradaptor/decode(from:).md)
- [decodeWithOptimizer(from:)](createmlcomponents/temporaltransformertoupdatableestimatoradaptor/decodewithoptimizer(from:).md)
