pub struct SqlResponse(/* private fields */);
Expand description
Response, returned from SQL requests.
Can be deserialized into different responses, depending on request.
Implementations§
Source§impl SqlResponse
impl SqlResponse
Sourcepub fn decode_select<T>(self) -> Result<Vec<T>, DecodingError>where
T: DeserializeOwned,
pub fn decode_select<T>(self) -> Result<Vec<T>, DecodingError>where
T: DeserializeOwned,
Decode as response on SELECT
.
Sourcepub fn decode_data_vec<T>(self) -> Result<Vec<T>, DecodingError>where
T: DeserializeOwned,
pub fn decode_data_vec<T>(self) -> Result<Vec<T>, DecodingError>where
T: DeserializeOwned,
Decode as data list in IPROTO_DATA
tag.
This is currently used for SELECT
, PRAGMA
and VALUES
responses.
Sourcepub fn row_count(self) -> Result<u64, DecodingError>
pub fn row_count(self) -> Result<u64, DecodingError>
Get number of affected rows.
Trait Implementations§
Source§impl Clone for SqlResponse
impl Clone for SqlResponse
Source§fn clone(&self) -> SqlResponse
fn clone(&self) -> SqlResponse
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SqlResponse
impl Debug for SqlResponse
Source§impl PartialEq for SqlResponse
impl PartialEq for SqlResponse
impl StructuralPartialEq for SqlResponse
Auto Trait Implementations§
impl Freeze for SqlResponse
impl RefUnwindSafe for SqlResponse
impl Send for SqlResponse
impl Sync for SqlResponse
impl Unpin for SqlResponse
impl UnwindSafe for SqlResponse
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