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/message_id.ml | |
| parent | Add more docs (diff) | |
| download | disml-8662e92987c437f59d09896a247ec2b5d82c4528.tar.xz disml-8662e92987c437f59d09896a247ec2b5d82c4528.zip | |
Publish docs updates
Diffstat (limited to 'lib/models/id/message_id.ml')
| -rw-r--r-- | lib/models/id/message_id.ml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/models/id/message_id.ml b/lib/models/id/message_id.ml index 4a4fbb3..10bcb1d 100644 --- a/lib/models/id/message_id.ml +++ b/lib/models/id/message_id.ml @@ -1,11 +1,11 @@ -type t = [ `Message_id of Snowflake.t ] [@@deriving sexp] - -let of_yojson a : (t, string) result = - match Snowflake.of_yojson a with - | Ok id -> Ok (`Message_id id) - | Error err -> Error err - -let of_yojson_exn a : t = `Message_id (Snowflake.of_yojson_exn a) -let to_yojson (`Message_id id) = (Snowflake.to_yojson id) - +type t = [ `Message_id of Snowflake.t ] [@@deriving sexp]
+
+let of_yojson a : (t, string) result =
+ match Snowflake.of_yojson a with
+ | Ok id -> Ok (`Message_id id)
+ | Error err -> Error err
+
+let of_yojson_exn a : t = `Message_id (Snowflake.of_yojson_exn a)
+let to_yojson (`Message_id id) = (Snowflake.to_yojson id)
+
let get_id (`Message_id id) = id
\ No newline at end of file |