#[non_exhaustive]pub struct ExecResult {
pub rows_affected: u64,
pub last_insert_id: Option<i64>,
}Expand description
What a side-effect statement reports back.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rows_affected: u64How many rows the statement changed.
last_insert_id: Option<i64>The auto-increment id of the inserted row — MySQL and SQLite only.
PostgreSQL answers None: use RETURNING there, which is the honest
cross-engine story rather than a pretend-portable one.
Implementations§
Trait Implementations§
Source§impl Clone for ExecResult
impl Clone for ExecResult
Source§fn clone(&self) -> ExecResult
fn clone(&self) -> ExecResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExecResult
Source§impl Debug for ExecResult
impl Debug for ExecResult
Source§impl Default for ExecResult
impl Default for ExecResult
Source§fn default() -> ExecResult
fn default() -> ExecResult
Returns the “default value” for a type. Read more
impl Eq for ExecResult
Source§impl PartialEq for ExecResult
impl PartialEq for ExecResult
impl StructuralPartialEq for ExecResult
Auto Trait Implementations§
impl Freeze for ExecResult
impl RefUnwindSafe for ExecResult
impl Send for ExecResult
impl Sync for ExecResult
impl Unpin for ExecResult
impl UnsafeUnpin for ExecResult
impl UnwindSafe for ExecResult
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