optic

fun <T, A> SharedFlow<T>.optic(g: Getter<T, A>): SharedFlow<A>(source)
fun <T, A> StateFlow<T>.optic(g: Getter<T, A>): StateFlow<A>(source)

Exposes the values of this through the optic.


fun <T, A> MutableStateFlow<T>.optic(lens: Lens<T, A>): MutableStateFlow<A>(source)

Exposes the values of this through the optic. Any change made to value is reflected in the original MutableStateFlow.


fun <T, A> State<T>.optic(g: Getter<T, A>): State<A>(source)

Exposes the value of this through the optic.


fun <T, A> MutableState<T>.optic(lens: Lens<T, A>): MutableState<A>(source)

Exposes the value of this through the optic. Any change made to value is reflected in the original MutableState.