# `SnakeBridge.StreamRef`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.14.0/lib/snakebridge/stream_ref.ex#L1)

Represents a Python iterator or generator as an Elixir stream.

Implements the `Enumerable` protocol for lazy iteration.

# `t`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.14.0/lib/snakebridge/stream_ref.ex#L18)

```elixir
@type t() :: %SnakeBridge.StreamRef{
  exhausted: boolean(),
  library: String.t(),
  pool_name: String.t() | atom() | nil,
  python_module: String.t(),
  ref_id: String.t(),
  session_id: String.t(),
  stream_type: String.t()
}
```

# `from_wire_format`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.14.0/lib/snakebridge/stream_ref.ex#L32)

```elixir
@spec from_wire_format(map()) :: t()
```

Creates a StreamRef from a decoded wire format.

# `to_wire_format`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.14.0/lib/snakebridge/stream_ref.ex#L48)

```elixir
@spec to_wire_format(t()) :: map()
```

Converts back to wire format for Python calls.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
