Jido.Memory.CapabilitySet (Jido Memory v1.0.0)

View Source

Normalized capability descriptor for a memory provider.

Summary

Functions

Returns a structured capability value by nested path.

Builds and normalizes a capability set.

Builds and normalizes a capability set, raising on error.

Returns the capability set schema.

Returns true when the capability set includes the given capability.

Types

t()

@type t() :: %Jido.Memory.CapabilitySet{
  capabilities: [atom()],
  descriptor: map(),
  key: nil | atom(),
  metadata: map(),
  provider: nil | atom()
}

Functions

get(capability_set, capability_path)

@spec get(t(), [atom()]) :: term()

Returns a structured capability value by nested path.

new(attrs)

@spec new(map() | keyword()) :: {:ok, t()} | {:error, term()}

Builds and normalizes a capability set.

new!(attrs)

@spec new!(map() | keyword()) :: t()

Builds and normalizes a capability set, raising on error.

schema()

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

Returns the capability set schema.

supports?(capability_set, capability)

@spec supports?(t(), atom() | [atom()]) :: boolean()

Returns true when the capability set includes the given capability.