pub struct ValidatorConfig {
pub schema_path: PathBuf,
pub schema_type: SchemaType,
pub max_payload_bytes: Option<usize>,
pub schema_cache_max_entries: usize,
pub fail_on_null_body: bool,
pub header_name: Option<String>,
pub fail_on_null_header: bool,
}Fields§
§schema_path: PathBuf§schema_type: SchemaType§max_payload_bytes: Option<usize>Maximum allowed body size in bytes. Bodies exceeding this limit are
rejected before validation begins. None means no limit.
schema_cache_max_entries: usizeMaximum number of entries in the XSD bridge schema cache. When the cache exceeds this limit, all entries are evicted before inserting the new one. Only relevant for XSD validation.
fail_on_null_body: boolWhen true (default), reject exchanges whose body is empty/null.
When false, empty bodies pass through without validation.
header_name: Option<String>When set, validate the value of this header instead of the body.
fail_on_null_header: boolWhen true (default) and header_name is set, reject exchanges where
the header is missing. When false, missing headers pass through.
Implementations§
Source§impl ValidatorConfig
impl ValidatorConfig
pub fn from_uri(uri: &str) -> Result<Self, CamelError>
Trait Implementations§
Source§impl Clone for ValidatorConfig
impl Clone for ValidatorConfig
Source§fn clone(&self) -> ValidatorConfig
fn clone(&self) -> ValidatorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValidatorConfig
impl RefUnwindSafe for ValidatorConfig
impl Send for ValidatorConfig
impl Sync for ValidatorConfig
impl Unpin for ValidatorConfig
impl UnsafeUnpin for ValidatorConfig
impl UnwindSafe for ValidatorConfig
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
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>
Wrap the input message
T in a tonic::Request