From 44f548562bc75ea0b35df6e9b865d14b7bd3f688 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Tue, 11 Nov 2025 11:16:14 +0100 Subject: [PATCH] doc: update documentation of catalog.upsert --- 01.workspace/heave/src/imp/catalog_upsert.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/01.workspace/heave/src/imp/catalog_upsert.rs b/01.workspace/heave/src/imp/catalog_upsert.rs index cd81b4d..673730d 100644 --- a/01.workspace/heave/src/imp/catalog_upsert.rs +++ b/01.workspace/heave/src/imp/catalog_upsert.rs @@ -18,6 +18,12 @@ impl Catalog { /// # Arguments /// /// * `object` - The object to insert or update, which must implement the `EAV` trait. + /// + /// # Errors + /// + /// Returns `Err(FailedTo::ConvertObject)` if the provided `object` cannot be + /// converted into an `Entity`. This typically indicates an issue with the + /// object's structure or missing required fields for entity conversion. pub fn upsert(&self, object: impl EAV) -> Result<(), FailedTo> { let mut entity = object.try_into().map_err(|_| FailedTo::ConvertObject)?; self.on_items(|items| {