pub enum Type {
Bool,
Null,
Integer,
Float,
String,
Buffer,
Object(Vec<ObjectProperty>),
Addon(String),
Array(Box<Type>),
Map(Vec<ObjectProperty>),
}Variants§
Bool
Null
Integer
Float
String
Buffer
Object(Vec<ObjectProperty>)
Addon(String)
Array(Box<Type>)
Map(Vec<ObjectProperty>)
Implementations§
Source§impl Type
impl Type
pub fn string() -> Type
pub fn integer() -> Type
pub fn float() -> Type
pub fn null() -> Type
pub fn bool() -> Type
pub fn object(props: Vec<ObjectProperty>) -> Type
pub fn map(props: Vec<ObjectProperty>) -> Type
pub fn buffer() -> Type
pub fn addon(id: &str) -> Type
pub fn array(array_item_type: Type) -> Type
pub fn check_value(&self, value: &Value) -> Result<(), Diagnostic>
pub fn as_object(&self) -> Option<&Vec<ObjectProperty>>
pub fn as_array(&self) -> Option<&Box<Type>>
pub fn as_map(&self) -> Option<&Vec<ObjectProperty>>
pub fn as_action(&self) -> Option<&String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<D>(deserializer: D) -> Result<Type, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Type, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.