pub struct SecureTextEdit<'a> { /* private fields */ }Expand description
A widget for editing text that is secured by a SecureString.
This widget is identical to egui::TextEdit, but it uses a SecureString instead of a std::string::String.
§Notes
- Accessability like screen readers is disabled to avoid multiple unsecure allocations of the entered text.
- If you want to make sure the text you enter doesn’t stay in memory in any way you have to set
Self::passwordtotrue.
Otherwise egui will make copies of that text and some of the copied allocations will stay in memory.
Implementations§
Source§impl<'a> SecureTextEdit<'a>
impl<'a> SecureTextEdit<'a>
pub fn singleline(text: &'a mut SecureString) -> Self
pub fn multiline(text: &'a mut SecureString) -> Self
pub fn id(self, id: Id) -> Self
pub fn id_source(self, id_source: impl Hash) -> Self
pub fn id_salt(self, id_salt: impl Hash) -> Self
pub fn hint_text(self, hint_text: impl Into<WidgetText>) -> Self
pub fn font(self, font_selection: impl Into<FontSelection>) -> Self
pub fn text_color(self, text_color: Color32) -> Self
pub fn text_color_opt(self, text_color: Option<Color32>) -> Self
pub fn password(self, password: bool) -> Self
pub fn frame(self, frame: bool) -> Self
pub fn margin(self, margin: impl Into<Margin>) -> Self
pub fn interactive(self, interactive: bool) -> Self
pub fn desired_width(self, desired_width: f32) -> Self
pub fn desired_rows(self, desired_height_rows: usize) -> Self
pub fn lock_focus(self, tab_will_indent: bool) -> Self
pub fn cursor_at_end(self, b: bool) -> Self
pub fn min_size(self, min_size: Vec2) -> Self
pub fn horizontal_align(self, align: Align) -> Self
pub fn vertical_align(self, align: Align) -> Self
pub fn clip_text(self, b: bool) -> Self
pub fn char_limit(self, limit: usize) -> Self
pub fn return_key(self, return_key: impl Into<Option<KeyboardShortcut>>) -> Self
pub fn background_color(self, color: Color32) -> Self
pub fn show(self, ui: &mut Ui) -> SecureTextEditOutput
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SecureTextEdit<'a>
impl<'a> RefUnwindSafe for SecureTextEdit<'a>
impl<'a> Send for SecureTextEdit<'a>
impl<'a> Sync for SecureTextEdit<'a>
impl<'a> Unpin for SecureTextEdit<'a>
impl<'a> !UnwindSafe for SecureTextEdit<'a>
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