Expand description
File access contract.
The runtime never touches storage itself. Nodes that need file bytes (document
extraction, uploads, vision) ask the FileResolver registered in
crate::node::Services as Arc<dyn FileResolver>. Hosts plug in their own
storage (S3, blob store, database); this module provides an in-process
resolver for inline data URLs and a ChainResolver to combine several.
Structs§
- Chain
Resolver - Tries resolvers in order; the first one not returning
Unsupportedwins. - Data
UrlResolver - Resolves
inlinefiles and any file whoseurlis adata:URL. - File
Bytes - File content with its detected media type.
Enums§
- File
Error - Error reading or storing a file.
Traits§
- File
Resolver - Reads (and optionally stores) file content.
Functions§
- base64_
decode - Standard and URL-safe base64 decoder (padding optional, whitespace ignored).
- base64_
encode - Standard base64 encoder with padding.
- decode_
data_ url - Decode a
data:[<mime>][;base64],<payload>URL.