MCPcopy Create free account
hub / github.com/Lintermute/lazy_errors / is_empty

Method is_empty

lazy_errors/src/stash.rs:403–408  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Callers 3

exec_implFunction · 0.80
from_strMethod · 0.80
is_acceptedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected