pub enum Type {
Integer(i64),
ByteString(String),
List(Vec<Type>),
Dictionary(BTreeMap<String, Type>),
}
Variants§
Implementations§
Source§impl Type
impl Type
pub fn from_json(s: &String) -> Result<Type, DeserializationError>
pub fn to_json(&self) -> Result<String, SerializationError>
pub fn load_from_json<P>(path: P) -> Result<Type, DeserializationError>
pub fn save_to_json<P>(&self, path: P) -> Result<(), SerializationError>
pub fn get(&self, key: String) -> Result<&Type, ConverterError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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