pub struct Record<'a> {
pub fields: Vec<(String, Value)>,
/* private fields */
}Expand description
Utility interface to build Value::Record objects.
Fields§
§fields: Vec<(String, Value)>List of fields contained in the record.
Ordered according to the fields in the schema given to create this
Record object. Any unset field defaults to Value::Null.
Implementations§
Source§impl Record<'_>
impl Record<'_>
Sourcepub fn new(schema: &Schema) -> Option<Record<'_>>
pub fn new(schema: &Schema) -> Option<Record<'_>>
Create a Record given a Schema.
If the Schema is not a Schema::Record variant, None will be returned.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Record<'a>
impl<'a> RefUnwindSafe for Record<'a>
impl<'a> Send for Record<'a>
impl<'a> Sync for Record<'a>
impl<'a> Unpin for Record<'a>
impl<'a> UnsafeUnpin for Record<'a>
impl<'a> UnwindSafe for Record<'a>
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