11 lines
318 B
Gleam
11 lines
318 B
Gleam
import gleam/dynamic/decode.{type Decoder}
|
|
import models/mount_symbol.{type MountSymbol}
|
|
|
|
pub type ScannedShipMount {
|
|
ScannedShipMount(symbol: MountSymbol)
|
|
}
|
|
|
|
pub fn decoder() -> Decoder(ScannedShipMount) {
|
|
use symbol <- decode.field("symbol", mount_symbol.decoder())
|
|
decode.success(ScannedShipMount(symbol:))
|
|
}
|