pub struct GeneratedString { /* private fields */ }Expand description
A plain or sensitive string used by generated Compose fields.
Implementations§
Source§impl GeneratedString
impl GeneratedString
Sourcepub fn plain(value: impl Into<String>) -> Result<Self, GenerationError>
pub fn plain(value: impl Into<String>) -> Result<Self, GenerationError>
Creates a non-sensitive generated string.
§Errors
Returns GenerationError::ContainsNul when the value contains a NUL byte.
Sourcepub fn sensitive(value: impl Into<String>) -> Result<Self, GenerationError>
pub fn sensitive(value: impl Into<String>) -> Result<Self, GenerationError>
Creates a sensitive generated string whose debug representation is redacted.
§Errors
Returns GenerationError::ContainsNul when the value contains a NUL byte.
Sourcepub const fn is_sensitive(&self) -> bool
pub const fn is_sensitive(&self) -> bool
Reports whether debug output must redact this value.
Trait Implementations§
Source§impl Clone for GeneratedString
impl Clone for GeneratedString
Source§fn clone(&self) -> GeneratedString
fn clone(&self) -> GeneratedString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeneratedString
impl Debug for GeneratedString
impl Eq for GeneratedString
Source§impl PartialEq for GeneratedString
impl PartialEq for GeneratedString
impl StructuralPartialEq for GeneratedString
Auto Trait Implementations§
impl Freeze for GeneratedString
impl RefUnwindSafe for GeneratedString
impl Send for GeneratedString
impl Sync for GeneratedString
impl Unpin for GeneratedString
impl UnsafeUnpin for GeneratedString
impl UnwindSafe for GeneratedString
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