pub struct NotFound {
pub entity: &'static str,
pub column: Option<&'static str>,
pub value: String,
}Expand description
A repo op that requires a row (find_by_*) found none. There is no
NotFound rejection — callers that tolerate absence use
maybe_find_by_*, which returns Option instead. Construct one and
propagate it with ?: it converts into any errlanes::Fault or
errlanes::Fail<D> as Fatal(Invariant).
Never impl errlanes::Rejection for NotFound — #[derive(Classify)]
below makes NotFound a fault wrapper, and a type that is both a
Rejection and a direct Classify impl conflicts (E0119).
Security note: value’s Debug may contain PII (e.g. an email
address looked up by a caller-supplied value). Display omits it.
Fields§
§entity: &'static str§column: Option<&'static str>§value: StringImplementations§
Trait Implementations§
Source§impl Error for NotFound
impl Error for NotFound
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for NotFound
impl RefUnwindSafe for NotFound
impl Send for NotFound
impl Sync for NotFound
impl Unpin for NotFound
impl UnsafeUnpin for NotFound
impl UnwindSafe for NotFound
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
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