pub struct DbObject {
pub type_name: String,
pub values: HashMap<String, Value>,
pub elements: Vec<Value>,
pub is_collection: bool,
}Expand description
An instance of a database object
Fields§
§type_name: StringThe object type
values: HashMap<String, Value>Attribute values (for object types)
elements: Vec<Value>Element values (for collections)
is_collection: boolWhether this is a collection
Implementations§
Source§impl DbObject
impl DbObject
Sourcepub fn collection(type_name: impl Into<String>) -> Self
pub fn collection(type_name: impl Into<String>) -> Self
Create a new collection instance
Sourcepub fn get_elements(&self) -> &[Value]
pub fn get_elements(&self) -> &[Value]
Get collection elements
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DbObject
impl RefUnwindSafe for DbObject
impl Send for DbObject
impl Sync for DbObject
impl Unpin for DbObject
impl UnwindSafe for DbObject
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)