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# as StdErrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#;
2 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/::PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#;
3 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/, iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/};
4
5 /// In this crate's `Result`s.
6 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
7 #[non_exhaustive]
8 pub enum Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error# {
9 /// TOML parsing errors
10 Parserust-analyzer cargo cargo_toml 0.22.3 error/Error#Parse#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::derust-analyzer cargo toml 1.1.4+spec-1.1.0 de/::Errorrust-analyzer cargo toml 1.1.4+spec-1.1.0 de/error/Error#>),
11 /// Filesystem access errors
12 Iorust-analyzer cargo cargo_toml 0.22.3 error/Error#Io#(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#),
13 /// Manifest uses workspace inheritance, and the workspace failed to load
14 Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#>)>),
15 /// Manifest uses workspace inheritance, and the data hasn't been inherited yet
16 InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue#,
17 /// Manifest uses workspace inheritance, but the root workspace is missing data
18 WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#),
19 /// ???
20 Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#(&'static str),
21 }
22
23 impl StdErrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error# {
24 fn sourcerust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]source().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&(dyn StdErrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + 'static)> {
25 match self {
26 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]::Parserust-analyzer cargo cargo_toml 0.22.3 error/Error#Parse#(err) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(err),
27 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]::Iorust-analyzer cargo cargo_toml 0.22.3 error/Error#Io#(err) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(err),
28 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]::Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(err) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&err.0),
29 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#(_) | Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]::InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue# | Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Error]::WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(_) => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
30 }
31 }
32 }
33
34 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 Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error# {
35 fn fmtrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][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# {
36 match self {
37 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]::Parserust-analyzer cargo cargo_toml 0.22.3 error/Error#Parse#(err) => err.fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Display]fmt().(f),
38 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]::Iorust-analyzer cargo cargo_toml 0.22.3 error/Error#Io#(err) => err.fmtrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error][Display]fmt().(f),
39 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#(msg) => f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(msg),
40 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]::WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(s) => f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(s),
41 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]::Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(err_path) => {
42 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("can't load root workspace")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
43 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(path) = &err_path.1 {
44 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, " at {}", path.displayrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]display().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
45 }
46 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(": ")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
47 err_path.0.fmtrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]fmt().(f)
48 },
49 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Display]::InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue# => f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("value from workspace hasn't been set"),
50 }
51 }
52 }
53
54 impl Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone# for Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error# {
55 fn clonerust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]clone().(&self) -> Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone] {
56 match self {
57 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Parserust-analyzer cargo cargo_toml 0.22.3 error/Error#Parse#(err) => Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Parserust-analyzer cargo cargo_toml 0.22.3 error/Error#Parse#(err.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Clone]clone().()),
58 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Iorust-analyzer cargo cargo_toml 0.22.3 error/Error#Io#(err) => Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Iorust-analyzer cargo cargo_toml 0.22.3 error/Error#Io#(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]new().(err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().(), err.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())),
59 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#(msg) => Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#(msg),
60 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(msg) => Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(msg.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][Clone]clone().()),
61 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(e) => Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(e.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Clone]clone().()),
62 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue# => Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][Clone]::InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue#,
63 }
64 }
65 }
66
67 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::derust-analyzer cargo toml 1.1.4+spec-1.1.0 de/::Errorrust-analyzer cargo toml 1.1.4+spec-1.1.0 de/error/Error#> for Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error# {
68 fn fromrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][`From<toml::de::Error>`]from().(o: tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::derust-analyzer cargo toml 1.1.4+spec-1.1.0 de/::Errorrust-analyzer cargo toml 1.1.4+spec-1.1.0 de/error/Error#) -> Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][`From<toml::de::Error>`] {
69 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][`From<toml::de::Error>`]::Parserust-analyzer cargo cargo_toml 0.22.3 error/Error#Parse#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(o))
70 }
71 }
72
73 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> for Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error# {
74 fn fromrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][`From<io::Error>`]from().(o: iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#) -> Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][`From<io::Error>`] {
75 Selfrust-analyzer cargo cargo_toml 0.22.3 error/impl#[Error][`From<io::Error>`]::Iorust-analyzer cargo cargo_toml 0.22.3 error/Error#Io#(o)
76 }
77 }