Serum.Fragment (serum_md v1.7.0)

Copy Markdown View Source

Defines a struct representing a page fragment.

Fields

  • file: Source path. This can be nil if created internally.
  • output: Destination path
  • metadata: A map holding extra information about the fragment
  • data: Contents of the page fragment

Summary

Functions

Creates a new Fragment struct.

Types

t()

@type t() :: %Serum.Fragment{
  data: binary(),
  file: binary() | nil,
  metadata: map(),
  output: binary()
}

Functions

new(file, output, metadata, data)

@spec new(binary() | nil, binary(), map(), binary()) :: Serum.Result.t(t())

Creates a new Fragment struct.