deep_causality/errors/update_error.rs
1/*
2 * SPDX-License-Identifier: MIT
3 * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
4 */
5
6use std::error::Error;
7use std::fmt;
8
9#[derive(Debug)]
10pub struct UpdateError(pub String);
11
12impl UpdateError {
13 pub fn new(field0: String) -> Self {
14 Self(field0)
15 }
16}
17
18impl Error for UpdateError {}
19
20impl fmt::Display for UpdateError {
21 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
22 write!(f, "UpdateError: {}", self.0)
23 }
24}