pub struct TextSettingBuilder { /* private fields */ }Expand description
Builder for TextSetting.
Implementations§
Source§impl TextSettingBuilder
impl TextSettingBuilder
Sourcepub fn max_length(&mut self, value: u32) -> &mut Self
pub fn max_length(&mut self, value: u32) -> &mut Self
This is the max amount of characters a text settings value can have.
Sourcepub fn is_password(&mut self, value: bool) -> &mut Self
pub fn is_password(&mut self, value: bool) -> &mut Self
If set, will hide the characters from the input field.
It will show dots instead. Please do know that communication between Touch Portal and the plug-in is open text. This option is made so that random people will not be able to peek at the password field. It is not secure.
Sourcepub fn read_only(&mut self, value: bool) -> &mut Self
pub fn read_only(&mut self, value: bool) -> &mut Self
For some settings you do not want the user to edit them but you do want to share them.
Using this switch will allow you to do so. Updating these setting values should be done with the dynamic functions.
Sourcepub fn build(&self) -> Result<TextSetting, TextSettingBuilderError>
pub fn build(&self) -> Result<TextSetting, TextSettingBuilderError>
Trait Implementations§
Source§impl Clone for TextSettingBuilder
impl Clone for TextSettingBuilder
Source§fn clone(&self) -> TextSettingBuilder
fn clone(&self) -> TextSettingBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextSettingBuilder
impl RefUnwindSafe for TextSettingBuilder
impl Send for TextSettingBuilder
impl Sync for TextSettingBuilder
impl Unpin for TextSettingBuilder
impl UnwindSafe for TextSettingBuilder
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