Silk

silk/trust_source

Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc.

A lexical replaceable source of independently owned trust snapshots.

When to use

Require TrustSource when a TLS or certificate workflow must load application-selected trust without choosing memory, files, or another provider. Use silk.memory_trust_source for explicit in-memory configuration.

Details

Each load returns one independent owner under caller limits. An application replaces the active provider through lexical Effect composition. No provider is selected globally or implicitly.

Gotchas

Loading authorities does not validate a path or identity. A provider must not silently add host roots, environment configuration, refresh, caches, watchers, or OS trust policy.

Import as TrustSource with import silk.trust_source { TrustSource }.

Public declarations: 1.

TrustSource

pub service TrustSource

A mutable lexical capability that loads one independent bounded trust snapshot.

Details

Each call serializes through the active mutable provider. The returned owner remains valid after later calls or provider replacement. The caller supplies all load limits and allocation.

Operation load

effect<'static> fn load(limits: TrustLoadLimits) -> TrustSnapshot ! TrustSourceError | OutOfMemoryError ? &mut TrustSource | &mut Allocator

Loads one independent trust snapshot from the active lexical provider.

Details

A semantic provider failure returns TrustSourceError. Allocation refusal returns OutOfMemoryError. A failed call publishes no snapshot and must not change installed trust.

On this page