massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / xdrlib.pyi
1 # Structs for xdrlib (Python 2 and 3)\r
2 from typing import Callable, List, Sequence, TypeVar\r
3 \r
4 _T = TypeVar('_T')\r
5 \r
6 class Error(Exception):\r
7     msg = ...  # type: str\r
8     def __init__(self, msg: str) -> None: ...\r
9 \r
10 class ConversionError(Error): ...\r
11 \r
12 class Packer:\r
13     def __init__(self) -> None: ...\r
14     def reset(self) -> None: ...\r
15     def get_buffer(self) -> bytes: ...\r
16     def get_buf(self) -> bytes: ...\r
17     def pack_uint(self, x: int) -> None: ...\r
18     def pack_int(self, x: int) -> None: ...\r
19     def pack_enum(self, x: int) -> None: ...\r
20     def pack_bool(self, x: bool) -> None: ...\r
21     def pack_uhyper(self, x: int) -> None: ...\r
22     def pack_hyper(self, x: int) -> None: ...\r
23     def pack_float(self, x: float) -> None: ...\r
24     def pack_double(self, x: float) -> None: ...\r
25     def pack_fstring(self, n: int, s: bytes) -> None: ...\r
26     def pack_fopaque(self, n: int, s: bytes) -> None: ...\r
27     def pack_string(self, s: bytes) -> None: ...\r
28     def pack_opaque(self, s: bytes) -> None: ...\r
29     def pack_bytes(self, s: bytes) -> None: ...\r
30     def pack_list(self, list: Sequence[_T], pack_item: Callable[[_T], None]) -> None: ...\r
31     def pack_farray(self, n: int, list: Sequence[_T], pack_item: Callable[[_T], None]) -> None: ...\r
32     def pack_array(self, list: Sequence[_T], pack_item: Callable[[_T], None]) -> None: ...\r
33 \r
34 class Unpacker:\r
35     def __init__(self, data: bytes) -> None: ...\r
36     def reset(self, data: bytes) -> None: ...\r
37     def get_position(self) -> int: ...\r
38     def set_position(self, position: int) -> None: ...\r
39     def get_buffer(self) -> bytes: ...\r
40     def done(self) -> None: ...\r
41     def unpack_uint(self) -> int: ...\r
42     def unpack_int(self) -> int: ...\r
43     def unpack_enum(self) -> int: ...\r
44     def unpack_bool(self) -> bool: ...\r
45     def unpack_uhyper(self) -> int: ...\r
46     def unpack_hyper(self) -> int: ...\r
47     def unpack_float(self) -> float: ...\r
48     def unpack_double(self) -> float: ...\r
49     def unpack_fstring(self, n: int) -> bytes: ...\r
50     def unpack_fopaque(self, n: int) -> bytes: ...\r
51     def unpack_string(self) -> bytes: ...\r
52     def unpack_opaque(self) -> bytes: ...\r
53     def unpack_bytes(self) -> bytes: ...\r
54     def unpack_list(self, unpack_item: Callable[[], _T]) -> List[_T]: ...\r
55     def unpack_farray(self, n: int, unpack_item: Callable[[], _T]) -> List[_T]: ...\r
56     def unpack_array(self, unpack_item: Callable[[], _T]) -> List[_T]: ...\r