pub struct BoundedMask {
pub text: String,
pub truncated: bool,
pub redacted: bool,
}Expand description
Result of mask_bounded: masked, window- and output-bounded text plus
the flags a caller needs to finish assembling a caller-visible
diagnostic.
Fields§
§text: StringMasked text, never longer than output_cap_chars plus one trailing
truncation-marker character. May be the bare truncation marker alone
when the retained window held a single token longer than the window.
truncated: boolTrue when text is not the complete masked input: the raw input
exceeded window_chars, the masked window exceeded output_cap_chars,
or the window held one token longer than the window that had to be
dropped whole.
redacted: boolTrue when the canonical masker replaced a span inside the retained
window, or the window’s only content was dropped whole for being an
oversized single token. A caller that decides whether raw content is
safe to echo back verbatim on this flag must also treat truncated
as reason enough on its own — content the window never retained is
exactly as unverified as content the masker redacted.
Trait Implementations§
Source§impl Clone for BoundedMask
impl Clone for BoundedMask
Source§impl Debug for BoundedMask
impl Debug for BoundedMask
impl Eq for BoundedMask
Source§impl PartialEq for BoundedMask
impl PartialEq for BoundedMask
impl StructuralPartialEq for BoundedMask
Auto Trait Implementations§
impl Freeze for BoundedMask
impl RefUnwindSafe for BoundedMask
impl Send for BoundedMask
impl Sync for BoundedMask
impl Unpin for BoundedMask
impl UnsafeUnpin for BoundedMask
impl UnwindSafe for BoundedMask
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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