1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use gltf_derive::Validate;
use serde_derive::{Serialize, Deserialize};
use std::fmt;
#[cfg(feature = "extras")]
use crate::{Path, Root};
#[cfg(feature = "extras")]
pub use serde_json::value::RawValue;
#[cfg(feature = "extras")]
use crate::validation::{Error, Validate};
#[cfg(feature = "extras")]
pub type Extras = Option<::std::boxed::Box<RawValue>>;
#[cfg(not(feature = "extras"))]
pub type Extras = Void;
#[derive(Clone, Default, Serialize, Deserialize, Validate)]
pub struct Void {
#[serde(default, skip_serializing)]
_allow_unknown_fields: (),
}
impl fmt::Debug for Void {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{{}}")
}
}
impl fmt::Display for Void {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{{}}")
}
}
#[cfg(feature = "extras")]
impl Validate for ::std::boxed::Box<RawValue> {
fn validate_minimally<P, R>(&self, _: &Root, _: P, _: &mut R)
where P: Fn() -> Path, R: FnMut(&Fn() -> Path, Error)
{
}
fn validate_completely<P, R>(&self, _: &Root, _: P, _: &mut R)
where P: Fn() -> Path, R: FnMut(&Fn() -> Path, Error)
{
}
}