pub enum TemplateWriteError {
Refused(TixError),
Failed(TixError),
}Expand description
Why a template write did not happen.
The two cases are deliberately distinct. Refused is the
registry/config declining the change — a bad ID, an unknown scope, an
unsupported field: nothing was written, and the caller should show the
message. Failed is infrastructure — the atomic save could
not complete. In both cases tix.toml is unchanged; only the remedy differs.
Variants§
Refused(TixError)
The candidate was invalid; the registry and tix.toml are unchanged.
Failed(TixError)
The candidate was valid but the atomic save failed; tix.toml is unchanged.
Implementations§
Source§impl TemplateWriteError
impl TemplateWriteError
Sourcepub fn into_inner(self) -> TixError
pub fn into_inner(self) -> TixError
Consume the error for its underlying TixError.
Sourcepub const fn is_refusal(&self) -> bool
pub const fn is_refusal(&self) -> bool
Whether this is a validation refusal rather than an infrastructure failure.
Trait Implementations§
Source§impl Debug for TemplateWriteError
impl Debug for TemplateWriteError
Source§impl Display for TemplateWriteError
impl Display for TemplateWriteError
Source§impl Error for TemplateWriteError
impl Error for TemplateWriteError
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()
Source§impl From<TixError> for TemplateWriteError
impl From<TixError> for TemplateWriteError
Source§fn from(error: TixError) -> Self
fn from(error: TixError) -> Self
A bare error from the registry is a refusal by default: the registry’s
failures are all validation, and the save path maps its own error to
TemplateWriteError::Failed explicitly.
Auto Trait Implementations§
impl !RefUnwindSafe for TemplateWriteError
impl !UnwindSafe for TemplateWriteError
impl Freeze for TemplateWriteError
impl Send for TemplateWriteError
impl Sync for TemplateWriteError
impl Unpin for TemplateWriteError
impl UnsafeUnpin for TemplateWriteError
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> 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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more