pub struct ValidationCtx { /* private fields */ }
Expand description
Implementations§
Source§impl ValidationCtx
impl ValidationCtx
Sourcepub fn in_table(
&mut self,
name: &'static str,
f: impl FnOnce(&mut ValidationCtx),
)
pub fn in_table( &mut self, name: &'static str, f: impl FnOnce(&mut ValidationCtx), )
Run the provided closer in the context of a new table.
Errors reported in the closure will include the provided identifier in their path.
Sourcepub fn in_field(
&mut self,
name: &'static str,
f: impl FnOnce(&mut ValidationCtx),
)
pub fn in_field( &mut self, name: &'static str, f: impl FnOnce(&mut ValidationCtx), )
Run the provided closer in the context of a new field.
Errors reported in the closure will be associated with the field.
Sourcepub fn with_array_items<'a, T: 'a>(
&mut self,
iter: impl Iterator<Item = &'a T>,
f: impl FnMut(&mut ValidationCtx, &T),
)
pub fn with_array_items<'a, T: 'a>( &mut self, iter: impl Iterator<Item = &'a T>, f: impl FnMut(&mut ValidationCtx, &T), )
Run the provided closer for each item in an array.
This handles tracking the active item, so that validation errors can be associated with the correct index.
Trait Implementations§
Source§impl Clone for ValidationCtx
impl Clone for ValidationCtx
Source§fn clone(&self) -> ValidationCtx
fn clone(&self) -> ValidationCtx
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ValidationCtx
impl Debug for ValidationCtx
Source§impl Default for ValidationCtx
impl Default for ValidationCtx
Source§fn default() -> ValidationCtx
fn default() -> ValidationCtx
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationCtx
impl RefUnwindSafe for ValidationCtx
impl Send for ValidationCtx
impl Sync for ValidationCtx
impl Unpin for ValidationCtx
impl UnwindSafe for ValidationCtx
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<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T
, using the provided data to resolve any offsets.