1 """Stub file for the '_struct' module."""
\r
3 from typing import Any, AnyStr, Tuple
\r
5 class error(Exception): ...
\r
7 class Struct(object):
\r
8 size = ... # type: int
\r
9 format = ... # type: str
\r
11 def __init__(self, fmt: str) -> None: ...
\r
12 def pack_into(self, buffer: bytearray, offset: int, obj: Any) -> None: ...
\r
13 def pack(self, *args) -> str: ...
\r
14 def unpack(self, s: str) -> Tuple[Any, ...]: ...
\r
15 def unpack_from(self, buffer: bytearray, offset: int = ...) -> Tuple[Any, ...]: ...
\r
17 def _clearcache() -> None: ...
\r
18 def calcsize(fmt: str) -> int: ...
\r
19 def pack(fmt: AnyStr, obj: Any) -> str: ...
\r
20 def pack_into(fmt: AnyStr, buffer: bytearray, offset: int, obj: Any) -> None: ...
\r
21 def unpack(fmt: AnyStr, data: str) -> Tuple[Any, ...]: ...
\r
22 def unpack_from(fmt: AnyStr, buffer: bytearray, offset: int = ...) -> Tuple[Any, ...]: ...
\r