pub struct DataObj<'parent> { /* private fields */ }
Expand description

A smart pointer to obs_data_t

Implementations

Creates a empty data object

Loads data into a object from a JSON string.

Loads data into a object from a JSON file.

  • backup_ext: optional backup file path in case the original file is bad.

Fetches a property from this object. Numbers are implicitly casted.

Sets a default value for the key.

Notes

Setting a default value for a DataArray is not supported and will panic.

Creates a JSON representation of this object.

Clears all values.

Trait Implementations

Returns the “default value” for a type. Read more
Executes the destructor for this type. Read more
Wraps the pointer into a owned wrapper. Read more
Returns the inner pointer.
Consumes the wrapper and transfers ownershop to the pointer Read more
Returns the inner pointer (mutable version).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.