🔀 Merge “refactoring/no-negative-identity-filter”
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / freenet / wot / Trust.kt
index 779dd20..f54cfc3 100644 (file)
@@ -21,3 +21,6 @@ package net.pterodactylus.sone.freenet.wot
  * Container class for trust in the web of trust.
  */
 data class Trust(val explicit: Int?, val implicit: Int?, val distance: Int?)
+
+fun trustExplicitely(value: Int) = Trust(explicit = value, implicit = null, distance = 1)
+fun trustImplicitely(value: Int, distance: Int = 2) = Trust(explicit = null, implicit = value, distance)