pub enum CatalogWriteError {
Show 27 variants
ItemGroupNotFound(Uuid),
UomNotFound(Uuid),
ParentNotFound(Uuid),
NoUsageFlag,
DuplicateItemCode(String),
DuplicateBarcode(String),
AttributeNotFound(Uuid),
BrandNotFound(Uuid),
ItemNotFound(Uuid),
ItemVariantNotFound(Uuid),
InvalidStatusTransition {
from: CatalogStatus,
to: CatalogStatus,
},
DuplicateUomCode(String),
DuplicateBrandCode(String),
DuplicateAttributeCode(String),
DuplicateValueCode(String),
DuplicateSku(String),
NoOptions,
UnknownAttribute(String),
UnknownAttributeValue(String),
RelativeShapeMismatch,
NonPositiveRelativeFactor,
UomCycle {
parent: Uuid,
},
Conversion(UomConversionError),
ProtectedUom {
code: String,
},
UomHasChildren {
code: String,
},
UomInUse {
code: String,
},
Db(Error),
}Variants§
ItemGroupNotFound(Uuid)
UomNotFound(Uuid)
ParentNotFound(Uuid)
NoUsageFlag
DuplicateItemCode(String)
DuplicateBarcode(String)
AttributeNotFound(Uuid)
BrandNotFound(Uuid)
ItemNotFound(Uuid)
ItemVariantNotFound(Uuid)
InvalidStatusTransition
A status transition the CatalogStatus state machine does not permit (e.g.
discontinued → active — discontinued is terminal). See schema/hooks/catalog.hook.yaml.
DuplicateUomCode(String)
DuplicateBrandCode(String)
DuplicateAttributeCode(String)
DuplicateValueCode(String)
DuplicateSku(String)
NoOptions
UnknownAttribute(String)
UnknownAttributeValue(String)
RelativeShapeMismatch
relative_factor was supplied without relative_uom_id (or vice versa): the tree
link shape is exactly “both set” or “both unset” (ADR-0023).
NonPositiveRelativeFactor
A tree link ratio of zero or less (the stored factor chain must stay positive).
UomCycle
Re-parenting a unit onto itself or one of its own descendants — that link would form a cycle, so no root (and no derivable factor) exists anymore.
Conversion(UomConversionError)
A conversion between units of different trees (or over a corrupt tree) failed loudly — the typed ADR-0023 failure, never a silent numeric result.
ProtectedUom
The unit is module-seeded reference data (is_protected) and cannot be deleted;
retire it through the status lifecycle instead (UM-4).
UomHasChildren
The unit is still the live parent of live units — re-link or detach the children before retiring it, or the tree would lean on an archived reference.
UomInUse
A live item still uses the unit as its default unit of measure (the orphaning hazard that keeps generic delete off the guarded surface — ADR-005).
Db(Error)
Implementations§
Trait Implementations§
Source§impl Debug for CatalogWriteError
impl Debug for CatalogWriteError
Source§impl Display for CatalogWriteError
impl Display for CatalogWriteError
Source§impl Error for CatalogWriteError
impl Error for CatalogWriteError
1.30.0 · 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()
Auto Trait Implementations§
impl !RefUnwindSafe for CatalogWriteError
impl !UnwindSafe for CatalogWriteError
impl Freeze for CatalogWriteError
impl Send for CatalogWriteError
impl Sync for CatalogWriteError
impl Unpin for CatalogWriteError
impl UnsafeUnpin for CatalogWriteError
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 more