fromValue static method

GhosttyResult fromValue(
  1. int value
)

Implementation

static GhosttyResult fromValue(int value) => switch (value) {
  0 => GHOSTTY_SUCCESS,
  -1 => GHOSTTY_OUT_OF_MEMORY,
  -2 => GHOSTTY_INVALID_VALUE,
  -3 => GHOSTTY_OUT_OF_SPACE,
  -4 => GHOSTTY_NO_VALUE,
  _ => throw ArgumentError('Unknown value for GhosttyResult: $value'),
};