pub struct SchemaSet {
pub root_system_id: String,
pub resources: BTreeMap<String, Vec<u8>>,
pub aliases: BTreeMap<String, String>,
}Expand description
A discovered schema set, keyed for transmission to the XML bridge.
Fields are public and the struct is exhaustive: camel-component-validator
is not a contract crate (ADR-0049), matching ValidatorConfig and
ValidatorError. A constructed set that omits the root key is a caller
error that SchemaSet::root_bytes handles without panicking.
Fields§
§root_system_id: StringRoot file’s normalized relative basename; the entry schema’s systemId.
resources: BTreeMap<String, Vec<u8>>Transmitted keys to schema bytes, sorted for determinism: every distinct root-relative virtual lookup key, plus a redundant entry keyed by each supplied alias URI carrying the same bytes (wire compatibility). Two keys MAY share one canonical file (for example a symlink loop back to the root), and each key counts toward the caps.
aliases: BTreeMap<String, String>Supplied absolute-URI alias -> normalized root-relative virtual path.
Transmitted as the authoritative aliased-schema virtual base (the
redundant resources alias-URI entry supplies bytes only); retained so
replay re-supplies the exact map and the cache key covers it.
Implementations§
Source§impl SchemaSet
impl SchemaSet
Sourcepub fn cache_key(&self) -> String
pub fn cache_key(&self) -> String
Stable cache key: xsd-<64 hex>.
Covers the root systemId, the sorted resource keys, each entry’s bytes digest, and the sorted alias map. Any changed child or alias rotates it.
The digest is length-prefixed and domain-separated, and it hashes a per-entry digest rather than raw concatenated bytes, so no two distinct sets can collide by concatenation ambiguity.
Sourcepub fn root_bytes(&self) -> &[u8] ⓘ
pub fn root_bytes(&self) -> &[u8] ⓘ
Bytes of the root schema.
Returns an empty slice rather than panicking when an externally constructed set does not carry the root key; discovery always populates it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaSet
impl RefUnwindSafe for SchemaSet
impl Send for SchemaSet
impl Sync for SchemaSet
impl Unpin for SchemaSet
impl UnsafeUnpin for SchemaSet
impl UnwindSafe for SchemaSet
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request