Debian Codegraph @

src/keywords/boolean.rs

raw symbols SCIP
1 use craterust-analyzer cargo jsonschema 0.37.4 crate/::pathsrust-analyzer cargo jsonschema 0.37.4 paths/::{LazyLocationrust-analyzer cargo jsonschema 0.37.4 paths/LazyLocation#, Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#};
2
3 use craterust-analyzer cargo jsonschema 0.37.4 crate/::{
4 errorrust-analyzer cargo jsonschema 0.37.4 error/::ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#,
5 keywordsrust-analyzer cargo jsonschema 0.37.4 keywords/::CompilationResultrust-analyzer cargo jsonschema 0.37.4 keywords/CompilationResult#,
6 validatorrust-analyzer cargo jsonschema 0.37.4 validator/::{Validaterust-analyzer cargo jsonschema 0.37.4 validator/Validate#, ValidationContextrust-analyzer cargo jsonschema 0.37.4 validator/ValidationContext#},
7 };
8 use serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::Valuerust-analyzer cargo serde_json 1.0.145 value/Value#;
9
10 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) struct FalseValidatorrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator# {
11 locationrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator#location.: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
12 }
13 impl FalseValidatorrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator# {
14 #[inline]
15 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn compilerust-analyzer cargo jsonschema 0.37.4 keywords/boolean/impl#[FalseValidator]compile().<'a>(location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#) -> CompilationResultrust-analyzer cargo jsonschema 0.37.4 keywords/CompilationResult#<'a> {
16 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(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().(FalseValidatorrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator# { locationrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator#location. }))
17 }
18 }
19 impl Validaterust-analyzer cargo jsonschema 0.37.4 validator/Validate# for FalseValidatorrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator# {
20 fn is_validrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/impl#[FalseValidator][Validate]is_valid().(&self, _: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, _ctx: &mut ValidationContextrust-analyzer cargo jsonschema 0.37.4 validator/ValidationContext#) -> bool {
21 false
22 }
23
24 fn validaterust-analyzer cargo jsonschema 0.37.4 keywords/boolean/impl#[FalseValidator][Validate]validate().<'i>(
25 &self,
26 instance: &'i Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
27 location: &LazyLocationrust-analyzer cargo jsonschema 0.37.4 paths/LazyLocation#,
28 _ctx: &mut ValidationContextrust-analyzer cargo jsonschema 0.37.4 validator/ValidationContext#,
29 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'i>> {
30 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::false_schemarust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]false_schema().(
31 self.locationrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/FalseValidator#location..clonerust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location][Clone]clone().(),
32 location.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
33 instance,
34 ))
35 }
36 }
37
38 #[cfg(test)]
39 mod testsrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/tests/ {
40 use craterust-analyzer cargo jsonschema 0.37.4 crate/::tests_utilrust-analyzer cargo jsonschema 0.37.4 tests_util/;
41 use serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!;
42
43 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
44 fn locationrust-analyzer cargo jsonschema 0.37.4 keywords/boolean/tests/location().() {
45 tests_utilrust-analyzer cargo jsonschema 0.37.4 tests_util/::assert_schema_locationrust-analyzer cargo jsonschema 0.37.4 tests_util/assert_schema_location().(&jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(false), &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1), "");
46 }
47 }