summaryrefslogtreecommitdiffstats
path: root/third_party/rust/uniffi_bindgen/src/bindings/python/templates/Int16Helper.py
blob: 99f19dc1c006a40427e1adb01ecb68385240f45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class _UniffiConverterInt16(_UniffiConverterPrimitiveInt):
    CLASS_NAME = "i16"
    VALUE_MIN = -2**15
    VALUE_MAX = 2**15

    @staticmethod
    def read(buf):
        return buf.read_i16()

    @staticmethod
    def write_unchecked(value, buf):
        buf.write_i16(value)