pub struct Validator { /* private fields */ }Implementations§
Source§impl Validator
impl Validator
pub fn at(&self, root: usize) -> Result<Validator, Error>
pub fn construction_memory_bytes( schema: &Schema, settings: &SchemaSettings, ) -> Result<usize, Error>
pub fn validate(&self, bytes: &[u8]) -> Result<(), PayloadError>
pub fn visit<'schema, 'payload, E>( &'schema self, bytes: &'payload [u8], visitor: impl FnMut(&[PathElement<'schema>], Event<'payload>) -> Result<(), E>, ) -> Result<(), VisitError<E>>
pub fn from_schema( schema: &Schema, settings: &SchemaSettings, ) -> Result<Validator, Error>
Trait Implementations§
Source§impl MemorySize for Validator
impl MemorySize for Validator
fn memory_size(&self) -> usize
Source§const INLINE_ONLY: bool = false
const INLINE_ONLY: bool = false
True only when every value occupies exactly
size_of::<Self>() bytes,
with no separately owned allocations or additional accounting charge.Auto Trait Implementations§
impl Freeze for Validator
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnsafeUnpin for Validator
impl UnwindSafe for Validator
Blanket Implementations§
impl<T> Allocation for T
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