pub struct TypedEntityChecker<T, C> { /* private fields */ }Expand description
Adapter that turns a TypedChecker<T> into a Checker.
On Checker::check_and_fix, it:
- Extracts
CheckObjectStatusfrom theRecord. - Deserializes the
RecordintoTviaEntity::from_record. - Delegates to
TypedChecker::check_and_fix_typed. - Serializes the (possibly mutated)
Tback into theRecordviaEntity::into_record.
Implementations§
Source§impl<T, C> TypedEntityChecker<T, C>where
T: TeaqlEntity,
impl<T, C> TypedEntityChecker<T, C>where
T: TeaqlEntity,
Trait Implementations§
Source§impl<T, C> Checker for TypedEntityChecker<T, C>
impl<T, C> Checker for TypedEntityChecker<T, C>
fn entity(&self) -> &str
fn check_and_fix( &self, ctx: &UserContext, record: &mut Record, location: &ObjectLocation, results: &mut CheckResults, )
fn required( &self, record: &Record, field: &str, location: &ObjectLocation, results: &mut CheckResults, )
fn min_string_length( &self, record: &Record, field: &str, min_len: usize, location: &ObjectLocation, results: &mut CheckResults, )
fn max_string_length( &self, record: &Record, field: &str, max_len: usize, location: &ObjectLocation, results: &mut CheckResults, )
Auto Trait Implementations§
impl<T, C> Freeze for TypedEntityChecker<T, C>where
C: Freeze,
impl<T, C> RefUnwindSafe for TypedEntityChecker<T, C>where
C: RefUnwindSafe,
impl<T, C> Send for TypedEntityChecker<T, C>where
C: Send,
impl<T, C> Sync for TypedEntityChecker<T, C>where
C: Sync,
impl<T, C> Unpin for TypedEntityChecker<T, C>where
C: Unpin,
impl<T, C> UnsafeUnpin for TypedEntityChecker<T, C>where
C: UnsafeUnpin,
impl<T, C> UnwindSafe for TypedEntityChecker<T, C>where
C: UnwindSafe,
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