We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f74e3f commit 20f7987Copy full SHA for 20f7987
apyds/common.py
@@ -9,7 +9,28 @@
9
import typing
10
from .buffer_size import buffer_size
11
12
-T = typing.TypeVar("T")
+
13
+class DsProto(typing.Protocol):
14
+ """Protocol for deductive system base types."""
15
16
+ @classmethod
17
+ def from_string(cls, string: str, capacity: int) -> typing.Self: ...
18
19
20
+ def from_binary(cls, binary: memoryview) -> typing.Self: ...
21
22
23
+ def to_string(cls, value: typing.Self, capacity: int) -> str: ...
24
25
26
+ def to_binary(cls, value: typing.Self) -> bytes: ...
27
28
+ def data_size(self) -> int: ...
29
30
+ def clone(self) -> typing.Self: ...
31
32
33
+T = typing.TypeVar("T", bound=DsProto)
34
35
36
class Common(typing.Generic[T]):
0 commit comments