Raxol.Terminal.Clipboard.Store (Raxol v0.5.0)

View Source

Manages clipboard content storage and retrieval.

Summary

Functions

Checks if a store entry is expired.

Gets the content from a store entry.

Gets the format from a store entry.

Gets the timestamp from a store entry.

Creates a new clipboard store entry.

Updates the content of a store entry.

Updates the format of a store entry.

Types

t()

@type t() :: %Raxol.Terminal.Clipboard.Store{
  content: String.t(),
  format: String.t(),
  timestamp: integer()
}

Functions

expired?(store, max_age)

@spec expired?(t(), integer()) :: boolean()

Checks if a store entry is expired.

get_content(store)

@spec get_content(t()) :: String.t()

Gets the content from a store entry.

get_format(store)

@spec get_format(t()) :: String.t()

Gets the format from a store entry.

get_timestamp(store)

@spec get_timestamp(t()) :: integer()

Gets the timestamp from a store entry.

new(content, format)

@spec new(String.t(), String.t()) :: t()

Creates a new clipboard store entry.

update_content(store, content)

@spec update_content(t(), String.t()) :: t()

Updates the content of a store entry.

update_format(store, format)

@spec update_format(t(), String.t()) :: t()

Updates the format of a store entry.