pub enum Tier {
Author,
StorageLocal,
StorageRemote,
Protocol(String),
}Expand description
Provenance tier — where a link came from in the trust model.
Downstream sanitizers read this to apply strictness matched to the source’s trustworthiness.
Loosest to strictest:
Tier::Author— link came from the developer’s hand-written configTier::StorageLocal— loaded from a local storage adapterTier::StorageRemote— loaded from a remote config serverTier::Protocol— returned by a protocol handler; carries the handler name (e.g.Tier::Protocol("web".into()))
TypeScript stores the stamp in a WeakMap keyed on runtime object
identity so an attacker-writable .provenance field on an incoming
link cannot pre-stamp itself for free. The Rust port uses a struct
field tagged #[serde(skip)] so it is excluded from JSON
round-trips; stamps are set in-memory after ValidateConfig’s
whitelist pass, never from input.
Variants§
Implementations§
Trait Implementations§
impl Eq for Tier
impl StructuralPartialEq for Tier
Auto Trait Implementations§
impl Freeze for Tier
impl RefUnwindSafe for Tier
impl Send for Tier
impl Sync for Tier
impl Unpin for Tier
impl UnsafeUnpin for Tier
impl UnwindSafe for Tier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more