1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
from typing import Mapping, Any
from typing_extensions import Protocol
from . import const
from . import server
class IServable(Protocol):
def __mapping__(self) -> Mapping[str, const.Handler]: ...
class ICheckable(Protocol):
def __mapping__(self) -> Mapping[str, Any]: ...
class IClosable(Protocol):
def close(self) -> None: ...
class IProtoMessage(Protocol):
@classmethod
def FromString(cls, s: bytes) -> 'IProtoMessage': ...
def SerializeToString(self) -> bytes: ...
class IEventsTarget(Protocol):
__dispatch__: Any # FIXME: should be events._Dispatch
class IServerMethodFunc(Protocol):
async def __call__(self, stream: 'server.Stream[Any, Any]') -> None: ...
class IReleaseStream(Protocol):
def __call__(self) -> None: ...
|