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

Structured reference to a Python object managed by SnakeBridge.

This struct defines the cross-language wire shape for Python object references.

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

```elixir
@type t() :: %SnakeBridge.Ref{
  id: String.t(),
  library: String.t() | nil,
  pool_name: String.t() | atom() | nil,
  python_module: String.t() | nil,
  schema: pos_integer(),
  session_id: String.t(),
  type_name: String.t() | nil
}
```

Structured reference to a Python object.

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

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

Creates a Ref from a wire format map.

# `ref?`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.14.0/lib/snakebridge/ref.ex#L90)

```elixir
@spec ref?(term()) :: boolean()
```

Checks if a value is a valid ref.

# `schema_version`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.14.0/lib/snakebridge/ref.ex#L34)

```elixir
@spec schema_version() :: pos_integer()
```

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

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

Converts a Ref to wire format for Python calls.

---

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