The Decode module enables you to decode Base64 strings into certain values.
A decoder type that knows how to decode a Base64 string.
string : Decoder String
String Decoder
.
bytes : Decoder Bytes
Bytes Decoder
.
decode : Decoder a -> String -> Result Error a
Turn a Decoder
into a certain value.
Decoding can fail, see Error
.
map : (a -> b) -> Decoder a -> Decoder b
Transforms the value produced by a decoder.
Errors that can occur during a decoding:
Base64.Decode.decode Base64.Decode.string "a===" == Err ValidationError
Base64.Decode.decode Base64.Decode.string "/Ng9" == Err InvalidByteSequence