Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
safe_path.hpp
Go to the documentation of this file.
1#pragma once
2
6
10
11#include <string>
12#include <string_view>
13#include <vector>
14
16
32runtime::Result<std::string, CapsuleError>
33admit_member_path(std::string_view raw, const CapsuleLimits& limits = kCapsuleLimitsV1);
34
39std::string collision_key(std::string_view normalized_path);
40
42runtime::Result<void, CapsuleError> check_collisions(const std::vector<std::string>& normalized);
43
44} // namespace pulp::authoring_capsule
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Archive and path budgets.
Definition archive.hpp:24
runtime::Result< std::string, CapsuleError > admit_member_path(std::string_view raw, const CapsuleLimits &limits=kCapsuleLimitsV1)
Verify a member path and return it unchanged.
constexpr CapsuleLimits kCapsuleLimitsV1
The frozen v1 budgets.
Definition limits.hpp:35
runtime::Result< void, CapsuleError > check_collisions(const std::vector< std::string > &normalized)
Detect a collision across a member set. Returns the first offending pair.
std::string collision_key(std::string_view normalized_path)
Fold a normalized path to the key used for collision detection: ASCII case-folded,...
Result<T, E> — success / failure union for fallible operations.
Admission failure vocabulary for authoring capsules.