# ParcelKt

Added in 1.17.0

*** ** * ** ***


```
public final class ParcelKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull T` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/os/ParcelKt#(android.os.Parcel).use(kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Parcel.html receiver, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Parcel.html, @https://developer.android.com/reference/androidx/annotation/NonNull T> block )` Executes the given `https://developer.android.com/reference/androidx/core/os/package-summary#(android.os.Parcel).use(kotlin.Function1)` function on `https://developer.android.com/reference/android/os/Parcel.html` resource and then `https://developer.android.com/reference/android/os/Parcel.html#recycle()`. |

## Public methods

### use

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/os/Parcel.kt+function:use) Added in [1.17.0](https://developer.android.com/jetpack/androidx/releases/core#1.17.0)

```
public static final @NonNull T <T extends Object> use(
    @NonNull Parcel receiver,
    @NonNull Function1<@NonNull Parcel, @NonNull T> block
)
```

Executes the given `https://developer.android.com/reference/androidx/core/os/package-summary#(android.os.Parcel).use(kotlin.Function1)` function on `https://developer.android.com/reference/android/os/Parcel.html` resource and then `https://developer.android.com/reference/android/os/Parcel.html#recycle()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Parcel.html, @https://developer.android.com/reference/androidx/annotation/NonNull T> block` | a function to process this `https://developer.android.com/reference/android/os/Parcel.html` resource. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull T` | the result of `https://developer.android.com/reference/androidx/core/os/package-summary#(android.os.Parcel).use(kotlin.Function1)` function invoked on `https://developer.android.com/reference/android/os/Parcel.html` resource. |