from abc import ABC, abstractmethod
from typing import Generic

from ._types import AnyType


class DependencyBuilder(Generic[AnyType], ABC):

    @abstractmethod
    def build(self) -> AnyType:
        raise NotImplementedError()

    @abstractmethod
    def destroy(self, instance: AnyType) -> None:
        raise NotImplementedError()
