Puck.Content.Part (Puck v0.2.11)

Copy Markdown View Source

A single content part within a message.

This is the core struct that represents any type of content. Use the factory functions in Puck.Content to create parts.

Summary

Types

content_type()

@type content_type() :: :text | :image_url | :image | :file | :audio | :video

t()

@type t() :: %Puck.Content.Part{
  data: binary() | nil,
  filename: String.t() | nil,
  media_type: String.t() | nil,
  metadata: map(),
  text: String.t() | nil,
  type: content_type(),
  url: String.t() | nil
}