# ComposableInferredTargetConstraints

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/ComposableInferredTargetConstraints.kt+class:androidx.compose.runtime.ComposableInferredTargetConstraints) Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.13.0-rc01) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  @ComposeCompilerApi
  @Retention(value = AnnotationRetention.BINARY)
  @Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER])
  annotation ComposableInferredTargetConstraints
  ```

*** ** * ** ***

An annotation generated by the Compose compiler plugin. Do not use explicitly.

The Compose compiler plugin generates this annotation to supplement `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTarget` annotations on functions that are themselves, or have lambda parameters that are, only compatible with a limited set of appliers.

This is intended to only be generated by the plugin and should not be used directly. Use `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableTarget` to explicitly indicate that a function is only compatible with a limited set of appliers instead.

For example, a function that has:

1. a body and a single lambda parameter that expect the same applier, where that applier is only allowed to have the name "WComposable" or "XComposable"

2. a return type that is a lambda whose body expects an applier that has the name "YComposable" or "ZComposable"

would have the following annotations added to it by the compiler plugin:

```kotlin
@ComposableInferredTarget(scheme = "[0[0]:[_]]")
@ComposableInferredTargetConstraints(
  positional = "[_[_]:[{YComposable,ZComposable}]]"
  indexed = "[{WComposable,XComposable}]"
)
```

The indices in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTarget` annotation work the same way as indices of `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableOpenTarget`. The body and lambda parameter of the function have the same index, 0, so the compiler encodes the set of appliers that they are compatible with at index 0 of `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#indexed()`. The body of the return type does not have an index, so the compiler encodes the set of appliers that it is compatible with in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#positional()`.

If the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#indexed()` argument is empty, it means that there are no constraints on any indexed parts of the annotated function. If the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#positional()` argument is empty, it means that there are no constraints on any non-indexed parts of the annotated function.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#ComposableInferredTargetConstraints(kotlin.String,kotlin.String)(positional: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, indexed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#indexed()` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableInferredTargetConstraints#positional()` | Cmn |

## Public constructors

### ComposableInferredTargetConstraints

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.13.0-rc01)

```
ComposableInferredTargetConstraints(positional: String, indexed: String)
```

## Public properties

### indexed

Cmn

```
val indexed: String
```

### positional

Cmn

```
val positional: String
```