pub struct Exists {
pub database: String,
pub uid: OdooId,
pub password: String,
pub model: String,
pub ids: OdooIds,
}Expand description
Check if the record(s) exist in the Odoo database
Note: This method works by accepting a list of ids, and returning only
the ids that actually exist. See ExistsResponse for more info.
§Example
client.exists(
"res.partner",
vec![1, 2, -1, 999999999]
).send()?;
// The response would be [1, 2], assuming that -1 and 999999999 do not existSee: odoo/models.py
Fields§
§database: StringThe database name (auto-filled by OdooClient)
uid: OdooIdThe user id (auto-filled by OdooClient)
password: StringThe user password (auto-filled by OdooClient)
model: StringThe Odoo model
ids: OdooIdsThe ids to check
Trait Implementations§
Source§impl JsonRpcParams for Exists
impl JsonRpcParams for Exists
type Container<T> = OdooOrmContainer<Exists>
type Response = ExistsResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooOrmMethod for Exists
impl OdooOrmMethod for Exists
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe the “ORM” method endpoint (e.g., “/web/session/authenticate”)
Source§fn method(&self) -> &'static str
fn method(&self) -> &'static str
Return the model method name (e.g., “read_group” or “create”)
Source§fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Build
self into a full JsonRpcRequestAuto Trait Implementations§
impl Freeze for Exists
impl RefUnwindSafe for Exists
impl Send for Exists
impl Sync for Exists
impl Unpin for Exists
impl UnwindSafe for Exists
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