Added improved models
This commit is contained in:
16
src/cpl_reactive_extensions/abc/subscribable.py
Normal file
16
src/cpl_reactive_extensions/abc/subscribable.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Union, Callable
|
||||
|
||||
from cpl_reactive_extensions.abc.observer import Observer
|
||||
from cpl_reactive_extensions.abc.unsubscribable import Unsubscribable
|
||||
|
||||
|
||||
class Subscribable(ABC):
|
||||
def __init__(self):
|
||||
ABC.__init__(self)
|
||||
|
||||
@abstractmethod
|
||||
def subscribe(
|
||||
self, observer_or_next: Union[Callable, Observer], on_error: Callable = None, on_complete: Callable = None
|
||||
) -> Unsubscribable:
|
||||
pass
|
||||
Reference in New Issue
Block a user