| 1 | use craterust-analyzer cargo schemars 1.2.2 crate/::SchemaGeneratorrust-analyzer cargo schemars 1.2.2 generate/SchemaGenerator#; |
| 2 | use craterust-analyzer cargo schemars 1.2.2 crate/::{json_schemarust-analyzer cargo schemars 1.2.2 macros/json_schema!, JsonSchemarust-analyzer cargo schemars 1.2.2 JsonSchema#, Schemarust-analyzer cargo schemars 1.2.2 schema/Schema#}; |
| 3 | use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#; |
| 4 | |
| 5 | impl JsonSchemarust-analyzer cargo schemars 1.2.2 JsonSchema# for corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::timerust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/::Durationrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/Duration# { |
| 6 | fn schema_namerust-analyzer cargo schemars 1.2.2 json_schema_impls/std_time/impl#[`core::time::Duration`][JsonSchema]schema_name().() -> Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str> { |
| 7 | "Duration".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 8 | } |
| 9 | |
| 10 | fn schema_idrust-analyzer cargo schemars 1.2.2 json_schema_impls/std_time/impl#[`core::time::Duration`][JsonSchema]schema_id().() -> Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str> { |
| 11 | "std::time::Duration".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 12 | } |
| 13 | |
| 14 | fn json_schemarust-analyzer cargo schemars 1.2.2 json_schema_impls/std_time/impl#[`core::time::Duration`][JsonSchema]json_schema().(generator: &mut SchemaGeneratorrust-analyzer cargo schemars 1.2.2 generate/SchemaGenerator#) -> Schemarust-analyzer cargo schemars 1.2.2 schema/Schema# { |
| 15 | json_schemarust-analyzer cargo schemars 1.2.2 macros/json_schema!!({ |
| 16 | "type": "object", |
| 17 | "required": ["secs", "nanos"], |
| 18 | "properties": { |
| 19 | "secs": u64::json_schemarust-analyzer cargo schemars 1.2.2 json_schema_impls/primitives/impl#[u64][JsonSchema]json_schema().(generator), |
| 20 | "nanos": u32::json_schemarust-analyzer cargo schemars 1.2.2 json_schema_impls/primitives/impl#[u32][JsonSchema]json_schema().(generator), |
| 21 | } |
| 22 | }) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | #[cfg(feature = "std")] |
| 27 | impl JsonSchemarust-analyzer cargo schemars 1.2.2 JsonSchema# for stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::timerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/::SystemTimerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/SystemTime# { |
| 28 | fn schema_namerust-analyzer cargo schemars 1.2.2 json_schema_impls/std_time/impl#[`std::time::SystemTime`][JsonSchema]schema_name().() -> Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str> { |
| 29 | "SystemTime".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 30 | } |
| 31 | |
| 32 | fn schema_idrust-analyzer cargo schemars 1.2.2 json_schema_impls/std_time/impl#[`std::time::SystemTime`][JsonSchema]schema_id().() -> Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str> { |
| 33 | "std::time::SystemTime".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 34 | } |
| 35 | |
| 36 | fn json_schemarust-analyzer cargo schemars 1.2.2 json_schema_impls/std_time/impl#[`std::time::SystemTime`][JsonSchema]json_schema().(generator: &mut SchemaGeneratorrust-analyzer cargo schemars 1.2.2 generate/SchemaGenerator#) -> Schemarust-analyzer cargo schemars 1.2.2 schema/Schema# { |
| 37 | json_schemarust-analyzer cargo schemars 1.2.2 macros/json_schema!!({ |
| 38 | "type": "object", |
| 39 | "required": ["secs_since_epoch", "nanos_since_epoch"], |
| 40 | "properties": { |
| 41 | "secs_since_epoch": u64::json_schemarust-analyzer cargo schemars 1.2.2 json_schema_impls/primitives/impl#[u64][JsonSchema]json_schema().(generator), |
| 42 | "nanos_since_epoch": u32::json_schemarust-analyzer cargo schemars 1.2.2 json_schema_impls/primitives/impl#[u32][JsonSchema]json_schema().(generator), |
| 43 | } |
| 44 | }) |
| 45 | } |
| 46 | } |