pub struct SchemaValidator;Expand description
Schema validator
Implementations§
Source§impl SchemaValidator
impl SchemaValidator
Sourcepub fn validate_required(
schema: &InputSchema,
present_mask: u64,
) -> Result<(), DCPError>
pub fn validate_required( schema: &InputSchema, present_mask: u64, ) -> Result<(), DCPError>
Validate that all required fields are present
present_mask is a bitmask where bit N indicates field N is present
Sourcepub fn validate_enum(field: &FieldDef, value: u8) -> Result<(), DCPError>
pub fn validate_enum(field: &FieldDef, value: u8) -> Result<(), DCPError>
Validate an enum value is within range
Sourcepub fn validate_input(
schema: &InputSchema,
present_mask: u64,
field_values: &[(usize, u8)],
) -> Result<(), DCPError>
pub fn validate_input( schema: &InputSchema, present_mask: u64, field_values: &[(usize, u8)], ) -> Result<(), DCPError>
Validate a complete input against schema
Validate shared binary arguments against a tool input schema.
Auto Trait Implementations§
impl Freeze for SchemaValidator
impl RefUnwindSafe for SchemaValidator
impl Send for SchemaValidator
impl Sync for SchemaValidator
impl Unpin for SchemaValidator
impl UnsafeUnpin for SchemaValidator
impl UnwindSafe for SchemaValidator
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