Debian Codegraph @

src/error.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#, fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/};
2
3 /// An error returned when a task could not be executed because a thread pool
4 /// was full.
5 ///
6 /// Contains the original task that failed to be submitted. This allows you to
7 /// try the submission again later or take some other action.
8 pub struct PoolFullErrorrust-analyzer cargo threadfin 0.1.2 error/PoolFullError#<T>(pub(craterust-analyzer cargo threadfin 0.1.2 crate/) T);
9
10 impl<T> PoolFullErrorrust-analyzer cargo threadfin 0.1.2 error/PoolFullError#<T> {
11 /// Extracts the inner task that could not be executed.
12 pub fn into_innerrust-analyzer cargo threadfin 0.1.2 error/impl#[`PoolFullError<T>`]into_inner().(self) -> T {
13 self.0rust-analyzer cargo threadfin 0.1.2 error/PoolFullError#0.
14 }
15 }
16
17 impl<T> Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for PoolFullErrorrust-analyzer cargo threadfin 0.1.2 error/PoolFullError#<T> {}
18
19 impl<T> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for PoolFullErrorrust-analyzer cargo threadfin 0.1.2 error/PoolFullError#<T> {
20 fn fmtrust-analyzer cargo threadfin 0.1.2 error/impl#[`PoolFullError<T>`][Debug]fmt().(&self, f: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
21 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("PoolFullError(..)")
22 }
23 }
24
25 impl<T> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PoolFullErrorrust-analyzer cargo threadfin 0.1.2 error/PoolFullError#<T> {
26 fn fmtrust-analyzer cargo threadfin 0.1.2 error/impl#[`PoolFullError<T>`][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
27 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("thread pool is full")
28 }
29 }
30
31 /// An error returned when attempting to configure the common thread pool after
32 /// it has already been initialized.
33 pub struct CommonAlreadyInitializedErrorrust-analyzer cargo threadfin 0.1.2 error/CommonAlreadyInitializedError#(());
34
35 impl CommonAlreadyInitializedErrorrust-analyzer cargo threadfin 0.1.2 error/CommonAlreadyInitializedError# {
36 pub(craterust-analyzer cargo threadfin 0.1.2 crate/) fn newrust-analyzer cargo threadfin 0.1.2 error/impl#[CommonAlreadyInitializedError]new().() -> Selfrust-analyzer cargo threadfin 0.1.2 error/impl#[CommonAlreadyInitializedError] {
37 Selfrust-analyzer cargo threadfin 0.1.2 error/impl#[CommonAlreadyInitializedError](())
38 }
39 }
40
41 impl Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for CommonAlreadyInitializedErrorrust-analyzer cargo threadfin 0.1.2 error/CommonAlreadyInitializedError# {}
42
43 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for CommonAlreadyInitializedErrorrust-analyzer cargo threadfin 0.1.2 error/CommonAlreadyInitializedError# {
44 fn fmtrust-analyzer cargo threadfin 0.1.2 error/impl#[CommonAlreadyInitializedError][Debug]fmt().(&self, f: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
45 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("CommonAlreadyInitializedError")
46 }
47 }
48
49 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for CommonAlreadyInitializedErrorrust-analyzer cargo threadfin 0.1.2 error/CommonAlreadyInitializedError# {
50 fn fmtrust-analyzer cargo threadfin 0.1.2 error/impl#[CommonAlreadyInitializedError][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
51 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("common thread pool already initialized")
52 }
53 }