pub struct Profile {
pub name: String,
pub email: String,
pub password: Option<String>,
pub password_confirmation: String,
pub current_password: Option<String>,
}Expand description
The profile form PasswordAuth edits an
AdminUser through, and a custom ProfileEditor can take as its
input: a name, an email address, an optional new password typed twice, and the current
password.
Fields§
§name: StringThe display name, posted as name.
email: StringThe email address the account signs in with, posted as email.
password: Option<String>The new password, posted as password; None when left blank, which keeps the current
one.
password_confirmation: StringThe new password typed again, posted as password_confirmation.
current_password: Option<String>The password the account signs in with today, posted as current_password; None when
left blank.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn password_errors(&self) -> FieldErrors
pub fn password_errors(&self) -> FieldErrors
The refusals new_password_errors makes of a new password; none when the profile keeps
the current one.
Trait Implementations§
Source§impl Debug for Profile
Redacts the passwords, so a profile logged with ? writes none to the log.
impl Debug for Profile
Redacts the passwords, so a profile logged with ? writes none to the log.
impl Eq for Profile
Source§impl FormInput for Profile
impl FormInput for Profile
Source§type Field = !
type Field = !
One variant per field: what
Action::validate_input
refuses a value under, so an error always names a field the form renders. The derive
names it after the struct: Closing declares ClosingField, whose reason field is
ClosingField::Reason. An input no hook refuses by field names
Infallible.Source§fn schema() -> Schema
fn schema() -> Schema
The value’s controls, each posting its own key. An empty schema asks for nothing: an
action runs on its button.
Source§fn parse(_cx: &Cx, values: &FormValues) -> Result<Self, Vec<FieldError>>
fn parse(_cx: &Cx, values: &FormValues) -> Result<Self, Vec<FieldError>>
Source§fn write(&self, out: &mut FormValues)
fn write(&self, out: &mut FormValues)
Write the value’s keys as its form posts them: a repeater fills a stored item’s row from
them, and its detail-page column reads them. A password writes nothing, as it never renders
back into a form. Nothing writes an action’s input or a sign-up, so a type used only there
writes nothing too.
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Forget for Profile
impl Freeze for Profile
impl Move for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.