pub struct DisableTwoFactorForm {
pub password: Option<String>,
pub current_password: Option<String>,
pub csrf: Option<String>,
}Fields§
§password: Option<String>§current_password: Option<String>§csrf: Option<String>Implementations§
Source§impl DisableTwoFactorForm
impl DisableTwoFactorForm
Sourcepub fn parse<__VldInputT: VldInput + ?Sized>(
input: &__VldInputT,
) -> Result<DisableTwoFactorForm, VldError>
pub fn parse<__VldInputT: VldInput + ?Sized>( input: &__VldInputT, ) -> Result<DisableTwoFactorForm, VldError>
Parse and validate input data into this struct.
Accepts any type implementing [VldInput]: JSON strings, file paths,
serde_json::Value, byte slices, etc.
Sourcepub fn parse_value(__vld_json: &Value) -> Result<DisableTwoFactorForm, VldError>
pub fn parse_value(__vld_json: &Value) -> Result<DisableTwoFactorForm, VldError>
Parse and validate directly from a serde_json::Value.
Source§impl DisableTwoFactorForm
impl DisableTwoFactorForm
Sourcepub fn validate<__VldT: Serialize>(instance: &__VldT) -> Result<(), VldError>
pub fn validate<__VldT: Serialize>(instance: &__VldT) -> Result<(), VldError>
Validate an existing Rust value that can be serialized to JSON.
The value is serialized via serde, then validated against the
schema. Returns Ok(()) on success, Err(VldError) with all
issues on failure.
Requires the serialize feature.
Source§impl DisableTwoFactorForm
impl DisableTwoFactorForm
Sourcepub fn json_schema() -> Value
pub fn json_schema() -> Value
Generate a JSON Schema / OpenAPI 3.1 representation of this struct.
Requires the openapi feature.
Sourcepub fn to_openapi_document() -> Value
pub fn to_openapi_document() -> Value
Wrap json_schema() in a minimal OpenAPI 3.1 document.
Requires the openapi feature.
Trait Implementations§
Source§impl Clone for DisableTwoFactorForm
impl Clone for DisableTwoFactorForm
Source§fn clone(&self) -> DisableTwoFactorForm
fn clone(&self) -> DisableTwoFactorForm
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DisableTwoFactorForm
impl Debug for DisableTwoFactorForm
Source§impl OpenApiParameterIn for DisableTwoFactorForm
impl OpenApiParameterIn for DisableTwoFactorForm
Source§fn parameter_in() -> Option<&'static str>
fn parameter_in() -> Option<&'static str>
Returns
"query", "path", "header", or "cookie" when the struct is
annotated with #[into_params(parameter_in = ...)], otherwise None.Source§impl VldDocSchema for DisableTwoFactorForm
impl VldDocSchema for DisableTwoFactorForm
fn json_schema() -> Value
Source§impl VldParse for DisableTwoFactorForm
impl VldParse for DisableTwoFactorForm
Auto Trait Implementations§
impl Freeze for DisableTwoFactorForm
impl RefUnwindSafe for DisableTwoFactorForm
impl Send for DisableTwoFactorForm
impl Sync for DisableTwoFactorForm
impl Unpin for DisableTwoFactorForm
impl UnsafeUnpin for DisableTwoFactorForm
impl UnwindSafe for DisableTwoFactorForm
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more