#[non_exhaustive]pub enum BuildError {
#[non_exhaustive] ResourceLimitReached {
resource: &'static str,
limit: usize,
},
#[non_exhaustive] CapacityTooLarge {
field: &'static str,
value: usize,
max: usize,
},
#[non_exhaustive] ThreadStartFailed {
component: &'static str,
worker: usize,
kind: ErrorKind,
raw_os_error: Option<i32>,
},
}Expand description
Failure to build a stopped Supervisor.
SupervisorBuilder::try_build returns this type while
validating capacities, reserving subscriber ownership, and starting required cleanup workers.
No Supervisor is returned on failure.
This enum and its data-carrying variants are non-exhaustive; keep a fallback arm and use .. when matching fields.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]ResourceLimitReached
The supervisor cannot reserve every required user-owned lifetime.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]CapacityTooLarge
A bounded async capacity exceeds Tokio’s structural limit.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]ThreadStartFailed
A required build-time cleanup worker could not start.
Subscriber metadata callbacks have not run when this error is returned.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Implementations§
Trait Implementations§
Source§impl Clone for BuildError
impl Clone for BuildError
Source§fn clone(&self) -> BuildError
fn clone(&self) -> BuildError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BuildError
Source§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
impl Eq for BuildError
Source§impl Error for BuildError
impl Error for BuildError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for BuildError
impl PartialEq for BuildError
impl StructuralPartialEq for BuildError
Auto Trait Implementations§
impl Freeze for BuildError
impl RefUnwindSafe for BuildError
impl Send for BuildError
impl Sync for BuildError
impl Unpin for BuildError
impl UnsafeUnpin for BuildError
impl UnwindSafe for BuildError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more