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

com.jetbrains.pluginverifier.repository.provider.ProvideResult.kt Maven / Gradle / Ivy

/*
 * Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 */

package com.jetbrains.pluginverifier.repository.provider

/**
 * Represents possible [provision] [ResourceProvider.provide] outcomes.
 */
sealed class ProvideResult {
  /**
   * The [resource] is successfully provided.
   */
  data class Provided(val resource: R) : ProvideResult()

  /**
   * Provision is failed because the specified resource is not found
   * in a place where it used to be.
   * The actual reason can be observed in [reason].
   */
  data class NotFound(val reason: String) : ProvideResult()

  /**
   * The resource was not provided due to network or other failure,
   * reason of which is the [reason] and a thrown exception is [error].
   */
  data class Failed(val reason: String, val error: Exception) : ProvideResult()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy