summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdoardo La Greca2025-08-05 20:09:16 +0200
committerEdoardo La Greca2025-08-05 20:09:16 +0200
commit53e0afc9379c24f9e131fc648ad40563774f9de1 (patch)
treec987d7eb4bb7e7c20ddc0f0b9c4fb9445916a3f8 /src
parent11ec6f13539ae0ef5d4f5b208250eca055d1a99f (diff)
document fromByte in NinePMessageType
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/NinePMessageType.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/NinePMessageType.kt b/src/main/kotlin/NinePMessageType.kt
index fadd0fe..4c8c60f 100644
--- a/src/main/kotlin/NinePMessageType.kt
+++ b/src/main/kotlin/NinePMessageType.kt
@@ -29,6 +29,11 @@ enum class NinePMessageType(val value: UByte) {
RWSTAT(127u);
companion object {
+ /**
+ * Obtain a [NinePMessageType] instance by matching its value.
+ *
+ * @throws NoSuchElementException if no such element has the provided value.
+ */
fun fromByte(value: UByte) = NinePMessageType.entries.first { it.value == value }
}
} \ No newline at end of file