1 2 3 4 5 6 7 8 9 10 11 12
use crate::Result; // TODO: Implement `Validate` trait for eligible types. pub(crate) trait Validate<Ctx: ?Sized> { type Error: Into<crate::Error>; unsafe fn validate<'data>( value: *const Self, context: &mut Ctx, ) -> Result<&'data Self, Self::Error>; }