diff options
| author | Adelyn Breedlove <[email protected]> | 2019-01-28 10:31:51 -0700 |
|---|---|---|
| committer | Adelyn Breedlove <[email protected]> | 2019-01-28 10:31:51 -0700 |
| commit | 8662e92987c437f59d09896a247ec2b5d82c4528 (patch) | |
| tree | f004cc14598351d4ad6b19d8e993d2f629c5e738 /lib/models/id/user_id_t.ml | |
| parent | Add more docs (diff) | |
| download | disml-8662e92987c437f59d09896a247ec2b5d82c4528.tar.xz disml-8662e92987c437f59d09896a247ec2b5d82c4528.zip | |
Publish docs updates
Diffstat (limited to 'lib/models/id/user_id_t.ml')
| -rw-r--r-- | lib/models/id/user_id_t.ml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/models/id/user_id_t.ml b/lib/models/id/user_id_t.ml index 5ed9f14..f168daa 100644 --- a/lib/models/id/user_id_t.ml +++ b/lib/models/id/user_id_t.ml @@ -1,11 +1,11 @@ -type t = [ `User_id of Snowflake.t ] [@@deriving sexp] - -let of_yojson a : (t, string) result = - match Snowflake.of_yojson a with - | Ok id -> Ok (`User_id id) - | Error err -> Error err - -let of_yojson_exn a : t = `User_id (Snowflake.of_yojson_exn a) -let to_yojson (`User_id id) = (Snowflake.to_yojson id) - +type t = [ `User_id of Snowflake.t ] [@@deriving sexp]
+
+let of_yojson a : (t, string) result =
+ match Snowflake.of_yojson a with
+ | Ok id -> Ok (`User_id id)
+ | Error err -> Error err
+
+let of_yojson_exn a : t = `User_id (Snowflake.of_yojson_exn a)
+let to_yojson (`User_id id) = (Snowflake.to_yojson id)
+
let get_id (`User_id id) = id
\ No newline at end of file |