Jido.Memory.ProviderRef (Jido Memory v1.0.1)

View Source

Normalized provider reference used by runtime dispatch.

Summary

Functions

Normalizes a provider name, module, tuple, or reference into a validated reference.

Returns the schema used to validate provider references.

Validates that a provider reference is loaded and implements the provider contract.

Types

provider_input()

@type provider_input() :: t() | atom() | {atom(), keyword()} | nil

t()

@type t() :: %Jido.Memory.ProviderRef{
  key: atom() | nil,
  module: module(),
  opts: keyword()
}

Functions

normalize(provider)

@spec normalize(provider_input()) :: {:ok, t()} | {:error, term()}

Normalizes a provider name, module, tuple, or reference into a validated reference.

schema()

@spec schema() :: Zoi.schema()

Returns the schema used to validate provider references.

validate(arg1)

@spec validate(t()) :: {:ok, t()} | {:error, term()}

Validates that a provider reference is loaded and implements the provider contract.