Structure representing an entry extracted from an archive file.
Matches the Rust ArchiveEntry struct.
Fields
:path- The path of the entry within the archive:mime_type- The MIME type of the entry content:result- The extraction result for this entry
Summary
Types
Functions
Creates an ArchiveEntry struct from a map.
Examples
iex> Kreuzberg.ArchiveEntry.from_map(%{
...> "path" => "document.pdf",
...> "mime_type" => "application/pdf",
...> "result" => %{"content" => "text"}
...> })
%Kreuzberg.ArchiveEntry{
path: "document.pdf",
mime_type: "application/pdf",
result: %{"content" => "text"}
}
Converts an ArchiveEntry struct to a map.
Examples
iex> entry = %Kreuzberg.ArchiveEntry{path: "doc.pdf", mime_type: "application/pdf"}
iex> Kreuzberg.ArchiveEntry.to_map(entry)
%{
"path" => "doc.pdf",
"mime_type" => "application/pdf",
"result" => nil
}