pub struct LoginRequest {
pub email: LoginRequestEmail,
pub password: LoginRequestPassword,
pub cohort_hash: Nullable<LoginRequestCohortHash>,
pub device_id: Nullable<LoginRequestDeviceId>,
}Expand description
Credentials, plus the two advisory identifiers a client may volunteer.
Debug is hand-written. A derived one would print the password into any log line, panic
message or tracing field that formatted the request — which is the single worst thing this
file could do, and is one #[derive(Debug)] away at all times.
No #[schema(min_length = ...)] on either credential, deliberately. Kynos 0.1.0 publishes a
string constraint into the document but does not enforce it on the request path — an empty
password reaches the handler — so declaring one would put a promise in the contract that the
server does not keep, which is the exact class of drift this rebuild exists to remove. Length
is a body-size concern and belongs to a limits middleware; it is recorded as owed rather than
asserted here.
Fields§
§email: LoginRequestEmail§password: LoginRequestPassword§cohort_hash: Nullable<LoginRequestCohortHash>§device_id: Nullable<LoginRequestDeviceId>Implementations§
Source§impl LoginRequest
impl LoginRequest
Sourcepub fn with_cohort_hash(
self,
value: impl Into<Nullable<LoginRequestCohortHash>>,
) -> Self
pub fn with_cohort_hash( self, value: impl Into<Nullable<LoginRequestCohortHash>>, ) -> Self
Set the cohort_hash member: a value, or Nullable::Null for an explicit null.
Sourcepub fn with_cohort_hash_null(self) -> Self
pub fn with_cohort_hash_null(self) -> Self
Set the cohort_hash member to an explicit null.
Sourcepub fn with_device_id(
self,
value: impl Into<Nullable<LoginRequestDeviceId>>,
) -> Self
pub fn with_device_id( self, value: impl Into<Nullable<LoginRequestDeviceId>>, ) -> Self
Set the device_id member: a value, or Nullable::Null for an explicit null.
Sourcepub fn with_device_id_null(self) -> Self
pub fn with_device_id_null(self) -> Self
Set the device_id member to an explicit null.
Trait Implementations§
Source§impl Clone for LoginRequest
impl Clone for LoginRequest
Source§fn clone(&self) -> LoginRequest
fn clone(&self) -> LoginRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoginRequest
impl Debug for LoginRequest
Source§impl<'de> Deserialize<'de> for LoginRequest
impl<'de> Deserialize<'de> for LoginRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<LoginRequestRequired> for LoginRequest
impl From<LoginRequestRequired> for LoginRequest
Source§fn from(required: LoginRequestRequired) -> Self
fn from(required: LoginRequestRequired) -> Self
A LoginRequest holding the members LoginRequestRequired holds, and every optional member unset, a member with a schema default included.
Source§impl PartialEq for LoginRequest
impl PartialEq for LoginRequest
Source§fn eq(&self, other: &LoginRequest) -> bool
fn eq(&self, other: &LoginRequest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LoginRequest
impl Serialize for LoginRequest
impl StructuralPartialEq for LoginRequest
Auto Trait Implementations§
impl Freeze for LoginRequest
impl RefUnwindSafe for LoginRequest
impl Send for LoginRequest
impl Sync for LoginRequest
impl Unpin for LoginRequest
impl UnsafeUnpin for LoginRequest
impl UnwindSafe for LoginRequest
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
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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