Debian Codegraph @

src/errors.rs

raw symbols SCIP
1 // Copyright 2020 - developers of the `grammers` project.
2 // Copyright 2022 - developers of the `tdlib-rs` project.
3 // Copyright 2024 - developers of the `tgt` and `tdlib-rs` projects.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! Errors that can occur during the parsing of [Type Language] definitions.
12 //!
13 //! [Type Language]: https://core.telegram.org/mtproto/TL
14
15 /// The error type for the parsing operation of [`Definition`]s.
16 ///
17 /// [`Definition`]: tl/struct.Definition.html
18 #[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:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)]
19 pub enum ParseErrorrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError# {
20 /// The definition is empty.
21 Emptyrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError#Empty#,
22
23 /// One of the parameters from this definition was invalid.
24 InvalidParamrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError#InvalidParam#(ParamParseErrorrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParamParseError#),
25
26 /// The name information is missing from the definition.
27 MissingNamerust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError#MissingName#,
28
29 /// The type information is missing from the definition.
30 MissingTyperust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError#MissingType#,
31
32 /// The parser does not know how to parse the definition.
33 NotImplementedrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError#NotImplemented#,
34
35 /// The file contained an unknown separator (such as `---foo---`)
36 UnknownSeparatorrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParseError#UnknownSeparator#,
37 }
38
39 /// The error type for the parsing operation of [`Parameter`]s.
40 ///
41 /// [`Parameter`]: tl/struct.Parameter.html
42 #[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:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)]
43 pub enum ParamParseErrorrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParamParseError# {
44 /// The parameter was empty.
45 Emptyrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParamParseError#Empty#,
46
47 /// The generic argument was invalid.
48 InvalidGenericrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParamParseError#InvalidGeneric#,
49
50 /// The parser does not know how to parse the parameter.
51 NotImplementedrust-analyzer cargo tdlib-rs-parser 1.4.0 errors/ParamParseError#NotImplemented#,
52 }