File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,14 @@ pub type DecodeFn =
22
22
23
23
/// Create a new encoder that can be be reused to encode strings in base32 clockwork
24
24
///
25
+ /// ## Examples
26
+ ///
27
+ /// ```gleam
28
+ /// let encode = new_encoder()
29
+ /// encode("foobar")
30
+ /// // -> Ok("csqpyrk1e8")
31
+ /// ```
32
+ ///
25
33
pub fn new_encoder ( ) -> EncodeFn {
26
34
let encodebook : EncodeBook =
27
35
clockwork_codebook
@@ -34,6 +42,14 @@ pub fn new_encoder() -> EncodeFn {
34
42
35
43
/// Create a new decoder that can be be reused to decode strings from base32 clockwork
36
44
///
45
+ /// ## Examples
46
+ ///
47
+ /// ```gleam
48
+ /// let decode = new_decoder()
49
+ /// decode("CSQPYRK1E8")
50
+ /// // -> Ok("foobar")
51
+ /// ```
52
+ ///
37
53
pub fn new_decoder ( ) -> DecodeFn {
38
54
let decodebook : DecodeBook =
39
55
clockwork_codebook
You can’t perform that action at this time.
0 commit comments