pub struct EditError(/* private fields */);Expand description
An error returned when an edit cannot be constructed or verified.
Normal Display and Debug output on EditError (and
std::error::Error::source) may include text from the YAML document when parsing failed.
Use EditError::masked (MaskedEditError) when logging or returning diagnostics from
sensitive or untrusted documents.
Implementations§
Source§impl EditError
impl EditError
Sourcepub fn kind(&self) -> EditErrorKind
pub fn kind(&self) -> EditErrorKind
The coarse error category.
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Human-readable description of why the edit failed or was refused.
For EditErrorKind::Parse, this message may include text from the YAML document;
use Self::masked when redaction is required.
Sourcepub const fn masked(&self) -> MaskedEditError<'_>
pub const fn masked(&self) -> MaskedEditError<'_>
Return a view whose Display and Debug output exclude all
YAML document text.
Mirrors ayaml::Error::masked: reports only the EditErrorKind and, when an
underlying ayaml::Error caused the failure, its ayaml::MaskedError view. Its
std::error::Error::source always returns None so an unmasked cause cannot leak
through error-chain formatters.
Trait Implementations§
impl Eq for EditError
Source§impl Error for EditError
impl Error for EditError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for EditError
Auto Trait Implementations§
impl !RefUnwindSafe for EditError
impl !UnwindSafe for EditError
impl Forget for EditError
impl Freeze for EditError
impl Move for EditError
impl Send for EditErrorwhere
BoxRaw<EditErrorInner>: Send,
impl Sync for EditErrorwhere
BoxRaw<EditErrorInner>: Sync,
impl Unpin for EditError
impl UnsafeUnpin for EditError
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
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
key and return true if they are equal.