[android-components](../../index.md) / [mozilla.components.support.base.observer](../index.md) / [Consumable](index.md) / [from](./from.md)

# from

`fun <T> from(value: `[`T`](from.md#T)`, onConsume: () -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` = null): `[`Consumable`](index.md)`<`[`T`](from.md#T)`>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/base/src/main/java/mozilla/components/support/base/observer/Consumable.kt#L84)

Creates a new Consumable wrapping the given value.

