pub trait TextSubtype:
Debug
+ Clone
+ Copy
+ Default
+ Send
+ Sync
+ 'static {
// Required method
fn name() -> &'static str;
// Provided methods
fn pattern() -> Option<&'static str> { ... }
fn placeholder() -> Option<&'static str> { ... }
fn is_multiline() -> bool { ... }
fn is_sensitive() -> bool { ... }
fn code_language() -> Option<&'static str> { ... }
}Expand description
Required Methods§
Provided Methods§
Sourcefn placeholder() -> Option<&'static str>
fn placeholder() -> Option<&'static str>
Returns placeholder text for UI.
Sourcefn is_multiline() -> bool
fn is_multiline() -> bool
Returns whether the input should be multiline.
Sourcefn is_sensitive() -> bool
fn is_sensitive() -> bool
Returns whether the value is sensitive (passwords, tokens).
Sourcefn code_language() -> Option<&'static str>
fn code_language() -> Option<&'static str>
Returns the associated code language for code subtypes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.