All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.seiko.imageloader.request.ImageResult.kt Maven / Gradle / Ivy

There is a newer version: 1.9.0
Show newest version
package com.seiko.imageloader.request

import androidx.compose.ui.graphics.painter.Painter
import com.seiko.imageloader.Image
import okio.BufferedSource

sealed interface ImageResult {
    val request: ImageRequest
}

data class SourceResult(
    override val request: ImageRequest,
    val channel: BufferedSource,
    val mimeType: String? = null,
    val metadata: Any? = null,
) : ImageResult

data class ComposeImageResult(
    override val request: ImageRequest,
    val image: Image,
) : ImageResult

data class ComposePainterResult(
    override val request: ImageRequest,
    val painter: Painter,
) : ImageResult

data class ErrorResult(
    override val request: ImageRequest,
    val error: Throwable,
) : ImageResult




© 2015 - 2025 Weber Informatics LLC | Privacy Policy