pub struct Validator<'consignment, 'resolver, C, R>where
C: ConsignmentApi,
R: ResolveTx,{ /* private fields */ }
Implementations§
Source§impl<'consignment, 'resolver, C, R> Validator<'consignment, 'resolver, C, R>where
C: ConsignmentApi,
R: ResolveTx,
impl<'consignment, 'resolver, C, R> Validator<'consignment, 'resolver, C, R>where
C: ConsignmentApi,
R: ResolveTx,
Sourcepub fn validate(consignment: &'consignment C, resolver: &'resolver R) -> Status
pub fn validate(consignment: &'consignment C, resolver: &'resolver R) -> Status
Validation procedure takes a schema object, root schema (if any), resolver function returning transaction and its fee for a given transaction id, and returns a validation object listing all detected failures, warnings and additional information.
When a failure detected, it not stopped; the failure is is logged into the status object, but the validation continues for the rest of the consignment data. This can help it debugging and detecting all problems with the consignment.
Auto Trait Implementations§
impl<'consignment, 'resolver, C, R> Freeze for Validator<'consignment, 'resolver, C, R>
impl<'consignment, 'resolver, C, R> !RefUnwindSafe for Validator<'consignment, 'resolver, C, R>
impl<'consignment, 'resolver, C, R> !Send for Validator<'consignment, 'resolver, C, R>
impl<'consignment, 'resolver, C, R> !Sync for Validator<'consignment, 'resolver, C, R>
impl<'consignment, 'resolver, C, R> Unpin for Validator<'consignment, 'resolver, C, R>
impl<'consignment, 'resolver, C, R> !UnwindSafe for Validator<'consignment, 'resolver, C, R>
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