pub enum PayrollError {
Db(Error),
NotFound(&'static str),
InvalidState(&'static str),
Invalid(String),
Unbalanced,
GlRejected(String),
EventPublish(String),
Remittance(RemittanceSeamError),
Statutory(StatutoryError),
}Variants§
Db(Error)
NotFound(&'static str)
InvalidState(&'static str)
Invalid(String)
Unbalanced
GlRejected(String)
EventPublish(String)
The post/remit row landed but the event sink refused the event — re-run the post verb; the already-posted branch re-publishes (at-least-once), and consumers dedup by record id.
Remittance(RemittanceSeamError)
Statutory(StatutoryError)
The statutory parameter resolution refused to compute (no effective rows for the period, an incomplete component set, …). Fail-closed by design: never a silent zero tax/pay.
Implementations§
Source§impl PayrollError
impl PayrollError
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
The HTTP status the guarded surface maps this error to. Client-shaped failures (bad input, wrong state, unwired seams the operator must compose, missing effective parameters) are 4xx/422 so the caller can distinguish them from infrastructure faults.
Trait Implementations§
Source§impl Debug for PayrollError
impl Debug for PayrollError
Source§impl Display for PayrollError
impl Display for PayrollError
Source§impl Error for PayrollError
impl Error for PayrollError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for PayrollError
impl From<Error> for PayrollError
Source§impl From<RemittanceSeamError> for PayrollError
impl From<RemittanceSeamError> for PayrollError
Source§fn from(source: RemittanceSeamError) -> Self
fn from(source: RemittanceSeamError) -> Self
Converts to this type from the input type.
Source§impl From<StatutoryError> for PayrollError
impl From<StatutoryError> for PayrollError
Source§fn from(source: StatutoryError) -> Self
fn from(source: StatutoryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PayrollError
impl !UnwindSafe for PayrollError
impl Freeze for PayrollError
impl Send for PayrollError
impl Sync for PayrollError
impl Unpin for PayrollError
impl UnsafeUnpin for PayrollError
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> 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