kt.types
Bring the Rust [Result Option] types to Kotlin
Installation
Add the dependency to your build.gradle.kts:
dependencies {
implementation("io.github.initdc:types:0.1.0")
}
Usage
import kt.types.*
val s = some(2)
val n = none<Int>()
val r = ok<Int, String>(2)
val e = err<Int, String>("error")
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/initdc/kt.types/fork)
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
Contributors
- initdc - creator and maintainer