View Source Serum.Fragment (serum_md v1.6.3)

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

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

Functions

Link to this function

new(file, output, metadata, data)

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

Creates a new Fragment struct.