diff --git a/01.workspace/heave/src/imp/catalog_get.rs b/01.workspace/heave/src/imp/catalog_get.rs index ac7841a..641798b 100644 --- a/01.workspace/heave/src/imp/catalog_get.rs +++ b/01.workspace/heave/src/imp/catalog_get.rs @@ -14,9 +14,16 @@ impl Catalog { /// /// An `Option` containing the converted entity if found in the in-memory /// cache, otherwise `None`. + /// + /// # Errors + /// + /// Returns `Err(FailedTo::ConvertEntity)` if the retrieved entity cannot be + /// converted into the specified type `T`. This typically happens if the + /// entity's data structure in the catalog does not match the expected + /// structure of `T`. pub fn get(&self, id: &str) -> Result, FailedTo> where - T: EAV, + T: EAV, // T must implement the EAV trait to allow conversion from an Entity { self.with_items(|items| { let entity = items.get(id);