com.geirolz.secret.effect.implicits.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secret-effect_3 Show documentation
Show all versions of secret-effect_3 Show documentation
A functional, type-safe and memory-safe class to handle secret values
package com.geirolz.secret.effect
import cats.effect.{Async, Resource}
import com.geirolz.secret.Secret
extension [T](secret: Secret[T])
def resource[F[_]: Async]: Resource[F, Secret[T]] =
Resource.make(Async[F].pure(secret))(s => Async[F].delay(s.destroy()))
© 2015 - 2024 Weber Informatics LLC | Privacy Policy