DataObject

Struct DataObject 

Source
pub struct DataObject {
    pub data_ref: usize,
}

Fields§

§data_ref: usize

Implementations§

Source§

impl DataObject

Source

pub fn init() -> ((u64, u64), (u64, u64))

Source

pub fn share() -> ((u64, u64), (u64, u64))

Source

pub fn mirror(q: (u64, u64), r: (u64, u64))

Source

pub fn new() -> Self

Source

pub fn get(data_ref: usize) -> Self

Source

pub fn incr(&self)

Source

pub fn decr(&self)

Source

pub fn try_from_string(s: &str) -> Result<Self, Box<dyn Error>>

Source

pub fn from_string(s: &str) -> Self

Source

pub fn to_string(&self) -> String

Source

pub fn duplicate(&self) -> Self

👎Deprecated since 0.3.0: please use clone instead
Source

pub fn shallow_copy(&self) -> Self

Source

pub fn deep_copy(&self) -> Self

Source

pub fn has(&self, key: &str) -> bool

Source

pub fn keys(self) -> Vec<String>

Source

pub fn get_keys(&self) -> Vec<String>

Source

pub fn get_property(&self, key: &str) -> Data

Source

pub fn try_get_property(&self, key: &str) -> Result<Data, NDataError>

Tries to get a property by key, returning a Result.

Source

pub fn try_get_string(&self, key: &str) -> Result<String, NDataError>

Source

pub fn try_get_boolean(&self, key: &str) -> Result<bool, NDataError>

Source

pub fn try_get_int(&self, key: &str) -> Result<i64, NDataError>

Source

pub fn try_get_float(&self, key: &str) -> Result<f64, NDataError>

Source

pub fn try_get_object(&self, key: &str) -> Result<DataObject, NDataError>

Source

pub fn try_get_array(&self, key: &str) -> Result<DataArray, NDataError>

Source

pub fn try_get_bytes(&self, key: &str) -> Result<DataBytes, NDataError>

Source

pub fn get_string(&self, key: &str) -> String

Source

pub fn get_bool(&self, key: &str) -> bool

👎Deprecated since 0.3.0: please use get_boolean instead
Source

pub fn get_i64(&self, key: &str) -> i64

👎Deprecated since 0.3.0: please use get_int instead
Source

pub fn get_f64(&self, key: &str) -> f64

👎Deprecated since 0.3.0: please use get_float instead
Source

pub fn get_boolean(&self, key: &str) -> bool

Source

pub fn get_int(&self, key: &str) -> i64

Source

pub fn get_float(&self, key: &str) -> f64

Source

pub fn get_object(&self, key: &str) -> DataObject

Source

pub fn get_array(&self, key: &str) -> DataArray

Source

pub fn get_bytes(&self, key: &str) -> DataBytes

Source

pub fn remove_property(&mut self, key: &str)

Source

pub fn set_property(&mut self, key: &str, data: Data)

Source

pub fn put_str(&mut self, key: &str, val: &str)

👎Deprecated since 0.3.0: please use put_string instead
Source

pub fn put_bool(&mut self, key: &str, val: bool)

👎Deprecated since 0.3.0: please use put_boolean instead
Source

pub fn put_i64(&mut self, key: &str, val: i64)

👎Deprecated since 0.3.0: please use put_int instead
Source

pub fn put_string(&mut self, key: &str, val: &str)

Source

pub fn put_boolean(&mut self, key: &str, val: bool)

Source

pub fn put_int(&mut self, key: &str, val: i64)

Source

pub fn put_float(&mut self, key: &str, val: f64)

Source

pub fn put_object(&mut self, key: &str, o: DataObject)

Source

pub fn put_list(&mut self, key: &str, a: DataArray)

👎Deprecated since 0.1.2: please use put_array instead
Source

pub fn put_array(&mut self, key: &str, a: DataArray)

Source

pub fn put_bytes(&mut self, key: &str, b: DataBytes)

Source

pub fn put_null(&mut self, key: &str)

Source

pub fn objects(&self) -> Vec<(String, Data)>

Source

pub fn print_heap()

Source

pub fn gc()

Trait Implementations§

Source§

impl Clone for DataObject

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataObject

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DataObject

Source§

fn default() -> DataObject

Returns the “default value” for a type. Read more
Source§

impl Drop for DataObject

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.