pub struct DataObject {
pub data_ref: usize,
}
Fields§
§data_ref: usize
Implementations§
Source§impl DataObject
impl DataObject
pub fn init() -> ((u64, u64), (u64, u64))
pub fn mirror(q: (u64, u64), r: (u64, u64))
pub fn new() -> Self
pub fn get(data_ref: usize) -> Self
pub fn incr(&self)
pub fn decr(&self)
pub fn try_from_string(s: &str) -> Result<Self, Box<dyn Error>>
pub fn from_string(s: &str) -> Self
pub fn to_string(&self) -> String
pub fn duplicate(&self) -> Self
👎Deprecated since 0.3.0: please use
clone
insteadpub fn shallow_copy(&self) -> Self
pub fn deep_copy(&self) -> Self
pub fn has(&self, key: &str) -> bool
pub fn keys(self) -> Vec<String>
pub fn get_keys(&self) -> Vec<String>
pub fn get_property(&self, key: &str) -> Data
Sourcepub fn try_get_property(&self, key: &str) -> Result<Data, NDataError>
pub fn try_get_property(&self, key: &str) -> Result<Data, NDataError>
Tries to get a property by key, returning a Result.
pub fn try_get_string(&self, key: &str) -> Result<String, NDataError>
pub fn try_get_boolean(&self, key: &str) -> Result<bool, NDataError>
pub fn try_get_int(&self, key: &str) -> Result<i64, NDataError>
pub fn try_get_float(&self, key: &str) -> Result<f64, NDataError>
pub fn try_get_object(&self, key: &str) -> Result<DataObject, NDataError>
pub fn try_get_array(&self, key: &str) -> Result<DataArray, NDataError>
pub fn try_get_bytes(&self, key: &str) -> Result<DataBytes, NDataError>
pub fn get_string(&self, key: &str) -> String
pub fn get_bool(&self, key: &str) -> bool
👎Deprecated since 0.3.0: please use
get_boolean
insteadpub fn get_i64(&self, key: &str) -> i64
👎Deprecated since 0.3.0: please use
get_int
insteadpub fn get_f64(&self, key: &str) -> f64
👎Deprecated since 0.3.0: please use
get_float
insteadpub fn get_boolean(&self, key: &str) -> bool
pub fn get_int(&self, key: &str) -> i64
pub fn get_float(&self, key: &str) -> f64
pub fn get_object(&self, key: &str) -> DataObject
pub fn get_array(&self, key: &str) -> DataArray
pub fn get_bytes(&self, key: &str) -> DataBytes
pub fn remove_property(&mut self, key: &str)
pub fn set_property(&mut self, key: &str, data: Data)
pub fn put_str(&mut self, key: &str, val: &str)
👎Deprecated since 0.3.0: please use
put_string
insteadpub fn put_bool(&mut self, key: &str, val: bool)
👎Deprecated since 0.3.0: please use
put_boolean
insteadpub fn put_i64(&mut self, key: &str, val: i64)
👎Deprecated since 0.3.0: please use
put_int
insteadpub fn put_string(&mut self, key: &str, val: &str)
pub fn put_boolean(&mut self, key: &str, val: bool)
pub fn put_int(&mut self, key: &str, val: i64)
pub fn put_float(&mut self, key: &str, val: f64)
pub fn put_object(&mut self, key: &str, o: DataObject)
pub fn put_list(&mut self, key: &str, a: DataArray)
👎Deprecated since 0.1.2: please use
put_array
insteadpub fn put_array(&mut self, key: &str, a: DataArray)
pub fn put_bytes(&mut self, key: &str, b: DataBytes)
pub fn put_null(&mut self, key: &str)
pub fn objects(&self) -> Vec<(String, Data)>
pub fn print_heap()
pub fn gc()
Trait Implementations§
Source§impl Clone for DataObject
impl Clone for DataObject
Source§impl Debug for DataObject
impl Debug for DataObject
Source§impl Default for DataObject
impl Default for DataObject
Source§fn default() -> DataObject
fn default() -> DataObject
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DataObject
impl RefUnwindSafe for DataObject
impl Send for DataObject
impl Sync for DataObject
impl Unpin for DataObject
impl UnwindSafe for DataObject
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