Enum bencode_encoder::Type
source · 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>where P: AsRef<Path>,
pub fn save_to_json<P>(&self, path: P) -> Result<(), SerializationError>where P: AsRef<Path>,
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