Closed DsoTsin closed 2 years ago
NSArray
NSMutableArray
NSDictionary
NSMutableDictionary
NSError
For example:
impl NSKeyedArchiver { pub fn new() -> Self { let mut dict = plist::Dictionary::new(); dict.insert("$version".to_owned(), plist::Value::Integer(100000.into())); //plist::Integer::from(0u64); dict.insert("$archiver".to_owned(), plist::Value::String("NSKeyedArchiver".to_owned())); let mut root = plist::Dictionary::new(); // assign root index root.insert("root".to_owned(), plist::Value::Uid(plist::Uid::new(1))); dict.insert("$top".to_owned(), plist::Value::Dictionary(root)); // array here let mut objects = Vec::new(); objects.push(plist::Value::String("$null".into())); dict.insert("$objects".to_owned(), plist::Value::Array(objects)); NSKeyedArchiver { v: plist::Value::Dictionary(dict), } }
It should be possible for this to be implemented in an external crate that uses this library. It's not something I'm willing to support myself.
NSArray
,NSMutableArray
,NSDictionary
,NSMutableDictionary
,NSError
, etc.For example: