Returns `true` if the stash is empty. ``` #[cfg(any(feature = "rust-v1.81", feature = "std"))] use lazy_errors::prelude::*; #[cfg(not(any(feature = "rust-v1.81", feature = "std")))] use lazy_errors::surrogate_error_trait::prelude::*; let mut errs = ErrorStash::new(|| "Summary message"); assert!(errs.is_empty()); errs.push("First error"); assert!(!errs.is_empty()); ```
(&self)
| 401 | /// assert!(!errs.is_empty()); |
| 402 | /// ``` |
| 403 | pub fn is_empty(&self) -> bool { |
| 404 | match self { |
| 405 | ErrorStash::Empty(_) => true, |
| 406 | ErrorStash::WithErrors(_) => false, |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | /// Returns all errors that have been put into this stash so far. |
| 411 | /// |
no outgoing calls
no test coverage detected