pub struct DeviceRequestField { /* private fields */ }Expand description
Validate one declared additional request field without changing native request fields.
Implementations§
Source§impl DeviceRequestField
impl DeviceRequestField
Sourcepub fn new(
callback: impl Fn(Option<Value>) -> AuthResult<DeviceFieldValidation> + Send + Sync + 'static,
) -> Self
pub fn new( callback: impl Fn(Option<Value>) -> AuthResult<DeviceFieldValidation> + Send + Sync + 'static, ) -> Self
Use a synchronous field schema.
Sourcepub fn new_async<F, Fut>(callback: F) -> Selfwhere
F: Fn(Option<Value>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = AuthResult<DeviceFieldValidation>> + Send + 'static,
pub fn new_async<F, Fut>(callback: F) -> Selfwhere
F: Fn(Option<Value>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = AuthResult<DeviceFieldValidation>> + Send + 'static,
Await a field schema once, without emulating JavaScript’s async-detection probe.
Sourcepub fn openapi_schema(self, schema: Value, required: bool) -> Self
pub fn openapi_schema(self, schema: Value, required: bool) -> Self
Document the input schema and input requiredness without executing the validator.
Defaults and transformations do not determine input requiredness. This declaration changes documentation only; the callback remains responsible for validation.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceRequestField
impl !UnwindSafe for DeviceRequestField
impl Freeze for DeviceRequestField
impl Send for DeviceRequestField
impl Sync for DeviceRequestField
impl Unpin for DeviceRequestField
impl UnsafeUnpin for DeviceRequestField
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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