pub enum CreateVals {
One(Map<String, Value>),
Multi(Vec<Value>),
}
Expand description
The values to a Create
request
The Odoo create()
function accepts either a dictionary (create one record),
or a list of dictionaries (create multiple records). To support those in an
ergonomic way, we will accept an enum for the value.
This enum implements From<...>
for both one & multi requests:
ⓘ
// create a single record
client.create(
"res.users",
jmap!{
"name": "Hello, world!",
}
);
// create multiple records
client.create(
"res.users",
jvec![
{"name": "Partner #1"},
{"name": "Partner #2"}
]
);
Variants§
Trait Implementations§
Source§impl Debug for CreateVals
impl Debug for CreateVals
Auto Trait Implementations§
impl Freeze for CreateVals
impl RefUnwindSafe for CreateVals
impl Send for CreateVals
impl Sync for CreateVals
impl Unpin for CreateVals
impl UnwindSafe for CreateVals
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