Skip to main content

DiagCode

Enum DiagCode 

Source
pub enum DiagCode {
Show 125 variants E0001 = 1, E0002 = 2, E0003 = 3, E0004 = 4, E0005 = 5, E0006 = 6, E0007 = 7, E0008 = 8, E0009 = 9, E0010 = 10, E0011 = 11, E0012 = 12, E0013 = 13, E0014 = 14, E0015 = 15, E0016 = 16, E0017 = 17, E0018 = 18, E0019 = 19, E0020 = 20, E0021 = 21, E0022 = 22, E0023 = 23, E0024 = 24, E0025 = 25, E0026 = 26, E0027 = 27, E0028 = 28, E0029 = 29, E0030 = 30, E0031 = 31, E0032 = 32, E0033 = 33, E0034 = 34, E0035 = 35, E0036 = 36, E0037 = 37, E0038 = 38, E0039 = 39, E0040 = 40, E0041 = 41, E0042 = 42, E0043 = 43, E0044 = 44, E0045 = 45, E0046 = 46, E0047 = 47, E0048 = 48, E0049 = 49, E0050 = 50, E0051 = 51, E0052 = 52, E0053 = 53, E0054 = 54, E0055 = 55, E0056 = 56, E0057 = 57, E0058 = 58, E0059 = 59, E0060 = 60, E0061 = 61, E0062 = 62, E0063 = 63, E0065 = 65, E0066 = 66, E0067 = 67, E1001 = 1_001, E1002 = 1_002, E2007 = 2_007, E2008 = 2_008, E2009 = 2_009, E2010 = 2_010, E2011 = 2_011, E2012 = 2_012, E2013 = 2_013, E3001 = 3_001, E3002 = 3_002, E3003 = 3_003, E3004 = 3_004, E3006 = 3_006, E3007 = 3_007, E3008 = 3_008, E3010 = 3_010, E3011 = 3_011, E4001 = 4_001, E4010 = 4_010, E4011 = 4_011, E4012 = 4_012, E4013 = 4_013, E4014 = 4_014, E4015 = 4_015, E4016 = 4_016, E4017 = 4_017, E4018 = 4_018, E4019 = 4_019, E5003 = 5_003, E5010 = 5_010, E5011 = 5_011, E5012 = 5_012, E0064 = 64, E0068 = 68, E0069 = 69, E0070 = 70, E0071 = 71, E0072 = 72, E0078 = 78, E0079 = 79, E0080 = 80, E0081 = 81, E0082 = 82, W6001 = 6_001, W6002 = 6_002, W6003 = 6_003, W6004 = 6_004, W6005 = 6_005, W6006 = 6_006, W6007 = 6_007, W6010 = 6_010, W7001 = 7_001, W7002 = 7_002, W7003 = 7_003, W7004 = 7_004, N8001 = 8_001, N8002 = 8_002, N8003 = 8_003,
}
Expand description

Stable diagnostic code. Rendered as E0001 / W6001 / N8001.

Variants§

§

E0001 = 1

Generic / unclassified syntax error.

Docs: docs/errors/E0001.md

§

E0002 = 2

Unexpected token encountered.

Docs: docs/errors/E0002.md

§

E0003 = 3

Expected <token>, found <token>.

Docs: docs/errors/E0003.md

§

E0004 = 4

Unclosed string literal (missing closing quote).

Docs: docs/errors/E0004.md

§

E0005 = 5

Unclosed block comment (missing */).

Docs: docs/errors/E0005.md

§

E0006 = 6

Invalid numeric literal (bad digits or suffix).

Docs: docs/errors/E0006.md

§

E0007 = 7

Expected a statement (clause keyword) but found something else.

Docs: docs/errors/E0007.md

§

E0008 = 8

Expected ; or end of input after statement.

Docs: docs/errors/E0008.md

§

E0009 = 9

Expected ( to start a node pattern.

Docs: docs/errors/E0009.md

§

E0010 = 10

Expected a node pattern after a relationship pattern.

Docs: docs/errors/E0010.md

§

E0011 = 11

Expected ) to close a node pattern.

Docs: docs/errors/E0011.md

§

E0012 = 12

Expected - at the start of a relationship pattern.

Docs: docs/errors/E0012.md

§

E0013 = 13

Expected - to close a left-arrow relationship pattern.

Docs: docs/errors/E0013.md

§

E0014 = 14

Expected - or -> to close a relationship pattern.

Docs: docs/errors/E0014.md

§

E0015 = 15

Expected ] to close a relationship detail block.

Docs: docs/errors/E0015.md

§

E0016 = 16

Expected a label name after :.

Docs: docs/errors/E0016.md

§

E0017 = 17

Expected a relationship type name after :.

Docs: docs/errors/E0017.md

§

E0018 = 18

Expected } to close a property map.

Docs: docs/errors/E0018.md

§

E0019 = 19

Expected a property key identifier.

Docs: docs/errors/E0019.md

§

E0020 = 20

Expected : separating a property key from its value.

Docs: docs/errors/E0020.md

§

E0021 = 21

Expected an expression for a property value.

Docs: docs/errors/E0021.md

§

E0022 = 22

Expected an identifier.

Docs: docs/errors/E0022.md

§

E0023 = 23

Expression nesting depth exceeds the parser limit.

Docs: docs/errors/E0023.md

§

E0024 = 24

Expected an operand after a unary operator.

Docs: docs/errors/E0024.md

§

E0025 = 25

Expected NULL after IS (or IS NOT).

Docs: docs/errors/E0025.md

§

E0026 = 26

Expected a right-hand side operand for a binary expression.

Docs: docs/errors/E0026.md

§

E0027 = 27

Expected an expression inside parentheses.

Docs: docs/errors/E0027.md

§

E0028 = 28

Expected ) to close a parenthesised expression.

Docs: docs/errors/E0028.md

§

E0029 = 29

Expected WITH after STARTS (i.e. STARTS WITH).

Docs: docs/errors/E0029.md

§

E0030 = 30

Expected WITH after ENDS (i.e. ENDS WITH).

Docs: docs/errors/E0030.md

§

E0031 = 31

Expected a property key name after ..

Docs: docs/errors/E0031.md

§

E0032 = 32

Expected an index expression inside […].

Docs: docs/errors/E0032.md

§

E0033 = 33

Expected ] to close a subscript / index expression.

Docs: docs/errors/E0033.md

§

E0034 = 34

Expected ) to close a function call argument list.

Docs: docs/errors/E0034.md

§

E0035 = 35

Expected a function call argument expression.

Docs: docs/errors/E0035.md

§

E0036 = 36

Expected an expression in a RETURN item.

Docs: docs/errors/E0036.md

§

E0037 = 37

Expected an identifier after AS (alias).

Docs: docs/errors/E0037.md

§

E0038 = 38

Expected BY after ORDER (i.e. ORDER BY).

Docs: docs/errors/E0038.md

§

E0039 = 39

Expected an expression in an ORDER BY item.

Docs: docs/errors/E0039.md

§

E0040 = 40

Expected an expression after SKIP.

Docs: docs/errors/E0040.md

§

E0041 = 41

Expected an expression after LIMIT.

Docs: docs/errors/E0041.md

§

E0042 = 42

Expected MATCH after OPTIONAL.

Docs: docs/errors/E0042.md

§

E0043 = 43

Expected an expression after WHERE.

Docs: docs/errors/E0043.md

§

E0044 = 44

Clause keyword encountered that is not yet implemented (deferred construct).

Docs: docs/errors/E0044.md

§

E0045 = 45

Expected a clause keyword (MATCH, WITH, RETURN, …).

Docs: docs/errors/E0045.md

§

E0046 = 46

Invalid escape sequence in a string literal.

Docs: docs/errors/E0046.md

§

E0047 = 47

Expected an expression in a list literal.

Docs: docs/errors/E0047.md

§

E0048 = 48

Expected ] to close a list literal.

Docs: docs/errors/E0048.md

§

E0049 = 49

Expected a key in a map literal.

Docs: docs/errors/E0049.md

§

E0050 = 50

Expected : in a map literal entry.

Docs: docs/errors/E0050.md

§

E0051 = 51

Expected an expression for a map literal value.

Docs: docs/errors/E0051.md

§

E0052 = 52

Expected } to close a map literal.

Docs: docs/errors/E0052.md

§

E0053 = 53

Expected an expression after UNWIND.

Docs: docs/errors/E0053.md

§

E0054 = 54

Expected AS after an UNWIND expression.

Docs: docs/errors/E0054.md

§

E0055 = 55

Expected a pattern after CREATE.

Docs: docs/errors/E0055.md

§

E0056 = 56

Expected a pattern after MERGE.

Docs: docs/errors/E0056.md

§

E0057 = 57

Expected a SET item (property assignment or label add).

Docs: docs/errors/E0057.md

§

E0058 = 58

Expected a REMOVE item (property access or label).

Docs: docs/errors/E0058.md

§

E0059 = 59

Expected an expression after DELETE.

Docs: docs/errors/E0059.md

§

E0060 = 60

Expected DELETE after DETACH.

Docs: docs/errors/E0060.md

§

E0061 = 61

Expected CREATE or MATCH after ON in a MERGE action.

Docs: docs/errors/E0061.md

§

E0062 = 62

Expected ] to close a variable-length hop quantifier.

Docs: docs/errors/E0062.md

§

E0063 = 63

Expected = after a path binder identifier.

Docs: docs/errors/E0063.md

§

E0065 = 65

Expected ( after a list-predicate keyword (cy-8x5).

Emitted by the parser when ANY / ALL / NONE / SINGLE is not immediately followed by an opening parenthesis at atom position.

Docs: docs/errors/E0065.md

§

E0066 = 66

Expected IN between the list-predicate binder and its source expression (cy-8x5).

Docs: docs/errors/E0066.md

§

E0067 = 67

Expected ) to close a list-predicate expression (cy-8x5).

Docs: docs/errors/E0067.md

§

E1001 = 1_001

Unresolved variable reference (spec §6.2).

Emitted by cyrs-sema resolve pass when a name that appears in an expression position cannot be found in any enclosing scope.

Docs: docs/errors/E1001.md

§

E1002 = 1_002

Variable shadows an outer binding (spec §6.2).

Emitted as a warning when SemaOptions::warn_shadowing is set and a new binding introduces a name already visible in an outer scope.

Docs: docs/errors/E1002.md

§

E2007 = 2_007

Variable used in arithmetic / numeric context but has non-Value kind (Node, Relationship, or Path). Schema-free kind-consistency check (spec §6.3).

Emitted by cyrs-sema kinds pass when a Node/Relationship/Path variable appears as an operand of an arithmetic expression.

Docs: docs/errors/E2007.md

§

E2008 = 2_008

Variable of incorrect kind used in pattern position (spec §6.3).

E.g., a Value variable where a node-pattern binder is expected, or a Node variable where a path binder is expected.

Emitted by cyrs-sema kinds pass.

Docs: docs/errors/E2008.md

§

E2009 = 2_009

Arithmetic operand has a non-numeric type (spec §7.4).

Emitted when an operand of +, -, *, /, %, or ^ infers to a type that cannot unify with Num (e.g., a boolean or a string).

Docs: docs/errors/E2009.md

§

E2010 = 2_010

String-operator operand has a non-string type (spec §7.4).

Emitted when an operand of CONTAINS, STARTS WITH, or ENDS WITH infers to a type other than String or Any.

Docs: docs/errors/E2010.md

§

E2011 = 2_011

Boolean-operator operand has a non-boolean type (spec §7.4).

Emitted when an operand of AND, OR, XOR, or unary NOT infers to a type other than Bool or Any.

Docs: docs/errors/E2011.md

§

E2012 = 2_012

IN list element type mismatch (spec §7.4).

Emitted when the left operand of IN infers to a type that cannot unify with the element type of the right-hand list.

Docs: docs/errors/E2012.md

§

E2013 = 2_013

IN right-hand operand is not a list (spec §7.4).

Emitted when the right-hand side of IN infers to a non-list type (e.g., x IN 42).

Docs: docs/errors/E2013.md

§

E3001 = 3_001

Unknown node label (spec §7.5).

Emitted by cyrs-sema schema-aware pass when a label referenced in a node pattern is not declared in the schema.

Docs: docs/errors/E3001.md

§

E3002 = 3_002

Unknown relationship type (spec §7.5).

Emitted by cyrs-sema schema-aware pass when a relationship type referenced in a pattern is not declared in the schema.

Docs: docs/errors/E3002.md

§

E3003 = 3_003

Unknown property on label or relationship type (spec §7.5).

Emitted when a property key in an inline pattern map is not declared on any of the node’s labels or the relationship’s type.

Docs: docs/errors/E3003.md

§

E3004 = 3_004

Property type mismatch (spec §7.5).

Emitted when a literal value in an inline property map cannot be stored in the declared property type (e.g., String into an Int slot).

Docs: docs/errors/E3004.md

§

E3006 = 3_006

Unknown function name (spec §7.5).

Emitted by cyrs-sema schema-aware pass when a function call references a name not present in the SchemaProvider’s catalog.

Docs: docs/errors/E3006.md

§

E3007 = 3_007

Function or procedure arity mismatch (spec §7.5).

Emitted when a function or procedure call provides the wrong number of arguments compared to the declared signature.

Docs: docs/errors/E3007.md

§

E3008 = 3_008

Unknown procedure name (spec §7.5).

Emitted by cyrs-sema schema-aware pass when a CALL clause references a procedure not present in the SchemaProvider’s catalog.

Docs: docs/errors/E3008.md

§

E3010 = 3_010

Schema-file property type is unresolved (spec 0002 §9).

Emitted by cypher schema check when a property or parameter declares an opaque type (e.g. DURATION, POINT) whose v0 structural meaning is deferred. Load succeeds — the type round- trips — but the linter flags it so operators know the type participates as an opaque symbolic value only.

Docs: docs/errors/E3010.md

§

E3011 = 3_011

Relationship-type endpoint cycles through the same label on both sides (spec 0002 §9).

Emitted by cypher schema check when a rel type declares the same label in both start_labels and end_labels. The spec permits self-loops but the linter surfaces them so operators can confirm they are intentional (e.g. KNOWS: Person → Person is fine; REPORTS_TO: Team → Team may be a modelling slip).

Docs: docs/errors/E3011.md

§

E4001 = 4_001

Dialect not supported (spec §9.3).

Emitted by cyrs-sema::dialect::reject_neo4j_current when the caller attempts to use the Neo4jCurrent dialect, which is not part of v1 (spec §9.3, §19–§20).

Docs: docs/errors/E4001.md

§

E4010 = 4_010

label_negation! in label expressions; GqlAligned only (spec §9.2).

Docs: docs/errors/E4010.md

§

E4011 = 4_011

label_unionA|B label-union in patterns; allowed in both v1 dialects (spec §9.2).

Docs: docs/errors/E4011.md

§

E4012 = 4_012

integer_division/ with integer operands; OpenCypherV9 only (spec §9.2).

Docs: docs/errors/E4012.md

§

E4013 = 4_013

union_set — plain UNION (set-semantics); allowed in both v1 dialects.

Docs: docs/errors/E4013.md

§

E4014 = 4_014

call_procedureCALL proc YIELD …; allowed in both v1 dialects.

Docs: docs/errors/E4014.md

§

E4015 = 4_015

load_csvLOAD CSV clause; deferred (spec §9.3).

Docs: docs/errors/E4015.md

§

E4016 = 4_016

apoc_functions — APOC-prefixed functions; deferred (spec §9.3).

Docs: docs/errors/E4016.md

§

E4017 = 4_017

exists_subqueryEXISTS { } subquery; deferred (spec §9.3).

Docs: docs/errors/E4017.md

§

E4018 = 4_018

cypher_prefixCYPHER n MATCH … header; deferred (spec §9.3).

Docs: docs/errors/E4018.md

§

E4019 = 4_019

call_in_transactionsCALL { } IN TRANSACTIONS; deferred (spec §9.3).

Docs: docs/errors/E4019.md

§

E5003 = 5_003

Type mismatch in unification — two incompatible concrete types cannot be unified (spec §7.2, §7.3).

Produced by cyrs-sema::unify::TypeMismatch::into_diagnostic. Call sites supply the source range; code is always E5003.

Docs: docs/errors/E5003.md

§

E5010 = 5_010

Indexing or slicing applied to a non-list expression (spec §7.4 / §19 row “List indexing / slicing”).

Emitted by cyrs-sema::kinds when xs[0] / xs[i..j] is applied to a target whose inferred type is not a list (and not Any / Unknown). v1 scope is list-only; string indexing is deferred to a follow-up bead and is rejected by this code until then.

Docs: docs/errors/E5010.md

§

E5011 = 5_011

List-predicate iterable is not a list (spec §7.4 / §19 row “List predicates”).

Emitted by cyrs-sema::kinds when the source expression of ANY / ALL / NONE / SINGLE (x IN xs [WHERE p]) is structurally non-list: a scalar literal, a Node / Relationship / Path variable, a map literal, or a pattern predicate. Value variables and call results are accepted because they may hold a list at runtime — schema-aware refinement is the follow-up’s job.

Docs: docs/errors/E5011.md

§

E5012 = 5_012

Built-in function argument kind mismatch (spec §7.4 / §10.2).

Emitted by cyrs-sema::infer when a call to a registered builtin passes an argument whose inferred type is incompatible with the parameter’s declared ArgShape. The canonical case is id(42) — the id builtin’s parameter is GraphEntity (Node | Relationship | Path), so a scalar literal is rejected.

Docs: docs/errors/E5012.md

§

E0064 = 64

Unclosed [ in a list-indexing / slicing expression (spec §4.3).

Emitted by the parser’s index_or_slice_postfix recovery path when no matching ] follows the inner expression / slice bounds. Distinct from E0033 (SUBSCRIPT_EXPR legacy path) so tooling can tell the two apart; the typed cy-7s6.1 grammar path uses this code exclusively.

Docs: docs/errors/E0064.md

§

E0068 = 68

Expected IN in list comprehension (spec §19 row “List comprehensions”).

Emitted by the parser’s list-comprehension production (cy-5gh) when the iteration-variable identifier is not followed by the IN keyword.

Docs: docs/errors/E0068.md

§

E0069 = 69

Expected | or ] in list comprehension (spec §19 row “List comprehensions”).

Emitted by the parser’s list-comprehension production (cy-5gh) when neither a projection pipe | nor the closing bracket ] follows the optional WHERE predicate / source expression.

Docs: docs/errors/E0069.md

§

E0070 = 70

Expected THEN in a CASE arm (spec §19 row “CASE”).

Emitted by the parser’s CASE production (cy-41u) when a WHEN <value> clause is not followed by the mandatory THEN keyword.

Docs: docs/errors/E0070.md

§

E0071 = 71

Expected END to close a CASE expression (spec §19 row “CASE”).

Emitted by the parser’s CASE production (cy-41u) when the terminating END keyword is missing after the final arm / optional ELSE branch.

Docs: docs/errors/E0071.md

§

E0072 = 72

Expected ) to close an EXISTS(<pattern>) pattern predicate (spec §6.1 / §19 row “Pattern predicates in expressions”).

Emitted by the parser’s exists_pattern_predicate production (cy-lve) when the closing paren of the wrapping EXISTS ( <pattern> ) form is missing. The bare-pattern form WHERE (a)-->(b) (cy-7lf) does not emit this code — the inner ) belongs to the pattern’s node-pattern production.

Docs: docs/errors/E0072.md

§

E0078 = 78

Expected } to close a map projection (spec §6.1 / §19 row “Map projection”; cy-01q).

Emitted by the parser’s map_projection_postfix production when the closing } of n { ... } is missing. Distinct from E0052 (map literal }) so tools can distinguish the two recovery paths.

§

E0079 = 79

Expected property name or * after . in a map projection item (cy-01q). Inside n { ... }, a . opens either .NAME (property selector) or .* (all-properties spread); anything else is an error.

§

E0080 = 80

Expected : in a map projection literal item (cy-01q). Distinct from E0050 (map literal :).

§

E0081 = 81

Expected expression for map projection literal value (cy-01q).

§

E0082 = 82

Expected an item in map projection: .name, key: expr, .*, or * (cy-01q).

§

W6001 = 6_001

Dead WITH — projection with no downstream reader.

§

W6002 = 6_002

Identifier collides with a reserved keyword; needs backtick quoting.

§

W6003 = 6_003

Duplicate key in map literal — last write wins.

§

W6004 = 6_004

Variable bound but never read.

§

W6005 = 6_005

Redundant OPTIONAL MATCH — no bound variables escape the clause.

§

W6006 = 6_006

Pattern has no label or type restriction — will scan broadly.

§

W6007 = 6_007

Inconsistent keyword casing inside one query.

§

W6010 = 6_010

Unreachable label — schema-file lint (spec 0002 §9).

Emitted by cypher schema check when a label is declared but not referenced by any relationship type’s start_labels or end_labels. Not fatal: isolated labels are permitted — they are legitimate for nodes created without relationships — but the lint surfaces them so operators catch typos in rel-type endpoint lists.

Docs: docs/errors/W6010.md

§

W7001 = 7_001

Cartesian product between disconnected MATCH components.

§

W7002 = 7_002

Expensive function call inside a row-wise filter.

§

W7003 = 7_003

Variable-length path without an upper bound.

§

W7004 = 7_004

Property access on an unindexed label in a selective filter.

§

N8001 = 8_001

Informational — pattern normalised to canonical direction.

§

N8002 = 8_002

Informational — inferred type of an expression.

§

N8003 = 8_003

Informational — variable dropped from scope by this projection.

Implementations§

Source§

impl DiagCode

Source

pub const ALL: &'static [DiagCode]

Canonical enumeration of every registered diagnostic code, in numeric order. This is THE registry used by tests/registry.rs to enforce spec §10.2 invariants — every variant added to DiagCode must also be appended here.

Source

pub const fn as_str(self) -> &'static str

Render as the stable wire-format string: E0001, W6001, N8001.

Source

pub const fn severity_char(self) -> char

Severity letter derived from the numeric range (spec §10.2).

0..=5999'E', 6000..=7999'W', 8000..=8999'N'. Panics if the discriminant falls outside any registered range — the ALL invariants enforced by tests/registry.rs make this unreachable at runtime.

Source

pub fn try_from_u16(numeric: u16) -> Option<DiagCode>

Recover the typed DiagCode for a numeric discriminant.

Returns None for any value not registered in DiagCode::ALL (including retired codes). Embedders that map cyrs errors to their own typed errors should prefer this over matching on raw u16 values from cyrs_syntax::SyntaxError::code — names survive renumbering, magic numbers do not (cy-emb3).

§Examples
use cyrs_diag::DiagCode;
assert_eq!(DiagCode::try_from_u16(3), Some(DiagCode::E0003));
assert_eq!(DiagCode::try_from_u16(6001), Some(DiagCode::W6001));
assert_eq!(DiagCode::try_from_u16(9999), None);
Source

pub fn from_u16_or_e0001(numeric: u16) -> DiagCode

Recover the typed DiagCode for a numeric discriminant, or fall back to DiagCode::E0001 for unknown values.

Convenience for diagnostic-rendering paths that must always produce a code (e.g. from impl on cyrs_syntax::SyntaxError). Prefer try_from_u16 when the embedder needs to distinguish “unknown code” from “registered E0001” (cy-emb3).

Trait Implementations§

Source§

impl Clone for DiagCode

Source§

fn clone(&self) -> DiagCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DiagCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for DiagCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<&SyntaxError> for DiagCode

Lift a cyrs_syntax::SyntaxError to its typed DiagCode.

cyrs-syntax carries diagnostic codes as u16 to avoid a reverse dependency on cyrs-diag (spec §3 crate graph). Embedders that already depend on cyrs-diag for rendering can recover the typed enum without re-implementing the lookup table:

use cyrs_diag::DiagCode;
use cyrs_syntax::parse;

let parse = parse("MATCH");
// First syntax error from a deliberately broken query.
let err = parse.errors().first().expect("at least one error");
let code: DiagCode = DiagCode::from(err);
// Match on a stable name — survives any future renumbering.
match code {
    DiagCode::E0001 | DiagCode::E0007 | DiagCode::E0045 => { /* generic / clause-level */ }
    _ => { /* other syntax codes */ }
}

Unknown numeric codes fall back to DiagCode::E0001 — see DiagCode::try_from_u16 for a fallible alternative (cy-emb3).

Source§

fn from(err: &SyntaxError) -> DiagCode

Converts to this type from the input type.
Source§

impl Hash for DiagCode

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for DiagCode

Source§

fn cmp(&self, other: &DiagCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DiagCode

Source§

fn eq(&self, other: &DiagCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for DiagCode

Source§

fn partial_cmp(&self, other: &DiagCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for DiagCode

Source§

impl Eq for DiagCode

Source§

impl StructuralPartialEq for DiagCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HashEqLike<&T> for T
where T: Hash + Eq,

Source§

fn hash<H>(&self, h: &mut H)
where H: Hasher,

Source§

fn eq(&self, data: &&T) -> bool

Source§

impl<T> HashEqLike<Cow<'_, T>> for T
where T: Hash + Eq + Clone,

Source§

fn hash<H>(&self, h: &mut H)
where H: Hasher,

Source§

fn eq(&self, data: &Cow<'_, T>) -> bool

Source§

impl<T> HashEqLike<T> for T
where T: Hash + Eq,

Source§

fn hash<H>(&self, h: &mut H)
where H: Hasher,

Source§

fn eq(&self, data: &T) -> bool

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Lookup<T> for T

Source§

fn into_owned(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more