SnakeBridge.Ref (SnakeBridge v0.7.4)

View Source

Structured reference to a Python object managed by SnakeBridge.

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

Summary

Types

t()

Structured reference to a Python object.

Functions

Creates a Ref from a wire format map.

Checks if a value is a valid ref.

Converts a Ref to wire format for Python calls.

Types

t()

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

Structured reference to a Python object.

Functions

from_wire_format(ref)

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

Creates a Ref from a wire format map.

ref?(ref)

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

Checks if a value is a valid ref.

schema_version()

@spec schema_version() :: pos_integer()

to_wire_format(ref)

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

Converts a Ref to wire format for Python calls.