class _StarReaderBase:
    def __init__(self, path: str) -> None: ...
    def next_block(self) -> DataBlock | None: ...
    def close(self) -> None: ...

class StarReader(_StarReaderBase):
    """Rust implementation of a STAR file reader."""

class StarTextReader(_StarReaderBase):
    """Rust implementation of a STAR file reader from text."""

class DataBlock:
    """Rust implementation of a STAR file data block."""
    @staticmethod
    def construct_single_block(
        name: str,
        scalars: list[tuple[str, str]],
    ) -> "DataBlock": ...
    @staticmethod
    def construct_loop_block(
        name: str,
        columns: list[str],
        content: list[str],
        nrows: int,
    ) -> "DataBlock": ...
    def name(self) -> str: ...
    def set_name(self, name: str) -> None: ...
    def single_to_list(self) -> list[tuple[str, str]]: ...
    def loop_columns(self) -> list[str]: ...
    def loop_content(self) -> str: ...
    def loop_content_with_sep(self, sep: str) -> str: ...
    def loop_nrows(self) -> int: ...
    def block_type(self) -> BlockType: ...
    def column_names(self) -> list[str]: ...
    def set_column_names(self, names: list[str]) -> None: ...
    def as_single(self) -> DataBlock: ...
    def as_loop(self) -> DataBlock: ...

class BlockType:
    def is_loop(self) -> bool: ...
