pub enum DescriptionValue {
Text(SharedString),
Unknown,
NotApplicable,
Redacted(SharedString),
}Expand description
What a detail row holds.
Variants§
Text(SharedString)
Unknown
Nobody knows what this is. Not the same as empty.
NotApplicable
The question does not arise for this record.
Redacted(SharedString)
The value exists and may not be shown. Only its shape is carried, so there is no text here for a snapshot or an export to leak.
Implementations§
Source§impl DescriptionValue
impl DescriptionValue
pub fn text(value: impl Into<SharedString>) -> Self
Sourcepub fn redacted(shape: impl Into<SharedString>) -> Self
pub fn redacted(shape: impl Into<SharedString>) -> Self
A redacted value described by its shape, such as "51 characters".
The shape is all the component ever sees. Callers that hold the secret
itself want DescriptionValue::redacted_from, which measures the
text and drops it.
Sourcepub fn redacted_from(secret: &str, cx: &App) -> Self
pub fn redacted_from(secret: &str, cx: &App) -> Self
Measures a secret and keeps only the measurement.
The measurement is a sentence a reader reads, so it comes from the installed catalogue rather than from this file.
Trait Implementations§
Source§impl Clone for DescriptionValue
impl Clone for DescriptionValue
Source§fn clone(&self) -> DescriptionValue
fn clone(&self) -> DescriptionValue
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 DescriptionValue
impl Debug for DescriptionValue
impl Eq for DescriptionValue
Source§impl From<&'static str> for DescriptionValue
impl From<&'static str> for DescriptionValue
Source§fn from(value: SharedString) -> Self
fn from(value: SharedString) -> Self
Converts to this type from the input type.
Source§impl From<String> for DescriptionValue
impl From<String> for DescriptionValue
Source§impl PartialEq for DescriptionValue
impl PartialEq for DescriptionValue
impl StructuralPartialEq for DescriptionValue
Auto Trait Implementations§
impl Freeze for DescriptionValue
impl RefUnwindSafe for DescriptionValue
impl Send for DescriptionValue
impl Sync for DescriptionValue
impl Unpin for DescriptionValue
impl UnsafeUnpin for DescriptionValue
impl UnwindSafe for DescriptionValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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