pub enum Error {
Basic(BasicError),
Style(StyleError),
Serde(SerdeErr),
Save(SaveError),
Parse(ParseError),
UnavailableSheetIdx(usize),
PayloadError(String),
DuplicateBlockKey {
block: String,
key: String,
},
PayloadFailed {
index: usize,
total: usize,
payload: String,
source: Box<Error>,
},
While {
doing: String,
source: Box<Error>,
},
}Expand description
Every failure the engine reports. A write never surfaces this directly: a
rejected transaction is turned into ActionEffect::error_message, with
the failing payload wrapped in PayloadFailed.
Variants§
Basic(BasicError)
Style(StyleError)
Serde(SerdeErr)
Save(SaveError)
Parse(ParseError)
PayloadError(String)
DuplicateBlockKey
A write would have given two records of one block the same row key.
(block, key, field) is the addressing scheme, so a repeat makes one
record unreachable and every aggregate over the block wrong — and does
it silently, which is why this is a refusal rather than a warning.
PayloadFailed
index indexes the payload list the caller sent, and payload is that
entry in the JSON shape it arrived in.
While
BasicError::While for the layers above the coordinate/id
conversions, which know the request in names and A1 rather than ids.
Implementations§
Source§impl Error
impl Error
Sourcepub fn at_payload(
self,
index: usize,
total: usize,
payload: &EditPayload,
) -> Error
pub fn at_payload( self, index: usize, total: usize, payload: &EditPayload, ) -> Error
Record which payload of a transaction raised this error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<BasicError> for Error
impl From<BasicError> for Error
Source§fn from(source: BasicError) -> Error
fn from(source: BasicError) -> Error
Source§impl From<Error> for ErrorMessage
impl From<Error> for ErrorMessage
Source§fn from(value: Error) -> ErrorMessage
fn from(value: Error) -> ErrorMessage
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Error
fn from(source: ParseError) -> Error
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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> 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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.