Package-level declarations

Types

Link copied to clipboard
class CacheSelfieBinarySuspend<T>(disk: DiskStorage, roundtrip: Roundtrip<T, ByteArray>, generator: suspend () -> T)
Link copied to clipboard
class CacheSelfieSuspend<T>(disk: DiskStorage, roundtrip: Roundtrip<T, String>, generator: suspend () -> T)

Functions

Link copied to clipboard
suspend fun cacheSelfie(toCache: suspend () -> String): CacheSelfieSuspend<String>
suspend fun <T> cacheSelfie(roundtrip: Roundtrip<T, String>, toCache: suspend () -> T): CacheSelfieSuspend<T>
Link copied to clipboard
suspend fun cacheSelfieBinary(toCache: suspend () -> ByteArray): CacheSelfieBinarySuspend<ByteArray>
suspend fun <T> cacheSelfieBinary(roundtrip: Roundtrip<T, ByteArray>, toCache: suspend () -> T): CacheSelfieBinarySuspend<T>
Link copied to clipboard
suspend fun <T : Serializable> cacheSelfieBinarySerializable(toCache: suspend () -> T): CacheSelfieBinarySuspend<T>

Memoizes any java.io.Serializable type as a binary blob.

Link copied to clipboard
inline suspend fun <T> cacheSelfieJson(noinline toCache: suspend () -> T): CacheSelfieSuspend<T>

Memoizes any type which is marked with @kotlinx.serialization.Serializable as pretty-printed json.

Link copied to clipboard
suspend fun expectSelfie(actual: Snapshot): StringSelfie
suspend fun expectSelfie(actual: ByteArray): BinarySelfie
suspend fun expectSelfie(actual: String): StringSelfie
suspend fun <T> expectSelfie(actual: T, camera: Camera<T>): StringSelfie
Link copied to clipboard
suspend fun <T> expectSelfies(items: Iterable<T>, toString: (T) -> String): StringSelfie
Link copied to clipboard
suspend fun preserveSelfiesOnDisk(vararg subsToKeep: String)