pub struct PasswordInput { /* private fields */ }Expand description
One sensitive password editor with a visual reveal action.
Revealing changes only the pixels. The value remains a secret for deterministic semantics, AccessKit text runs and values, Debug, and clipboard copy/cut.
Implementations§
Source§impl PasswordInput
impl PasswordInput
pub fn new( ident: impl Into<Ident>, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
pub fn placeholder(self, placeholder: impl Into<SharedString>) -> Self
Sourcepub fn name(self, name: impl Into<SharedString>) -> Self
pub fn name(self, name: impl Into<SharedString>) -> Self
Names the one native password input when its visible label is outside this view.
Sourcepub fn text(self, text: impl Into<SharedString>) -> Self
pub fn text(self, text: impl Into<SharedString>) -> Self
Seeds the sensitive text without reporting a caller edit.
pub fn invalid(self, invalid: bool) -> Self
pub fn required(self, required: bool) -> Self
pub fn read_only(self, read_only: bool) -> Self
pub fn value(&self, cx: &App) -> SharedString
pub fn is_revealed(&self) -> bool
pub fn selected_range(&self, cx: &App) -> Range<usize> ⓘ
pub fn set_value( &mut self, value: impl Into<SharedString>, cx: &mut Context<'_, Self>, )
pub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
pub fn set_read_only(&mut self, read_only: bool, cx: &mut Context<'_, Self>)
pub fn set_invalid(&mut self, invalid: bool, cx: &mut Context<'_, Self>)
Trait Implementations§
Source§impl Debug for PasswordInput
impl Debug for PasswordInput
Source§impl Disableable for PasswordInput
impl Disableable for PasswordInput
impl EventEmitter<PasswordInputEvent> for PasswordInput
Source§impl Focusable for PasswordInput
impl Focusable for PasswordInput
Source§fn focus_handle(&self, cx: &App) -> FocusHandle
fn focus_handle(&self, cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Render for PasswordInput
impl Render for PasswordInput
Auto Trait Implementations§
impl !RefUnwindSafe for PasswordInput
impl !Send for PasswordInput
impl !Sync for PasswordInput
impl !UnwindSafe for PasswordInput
impl Freeze for PasswordInput
impl Unpin for PasswordInput
impl UnsafeUnpin for PasswordInput
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> 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