mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-09 13:02:19 +08:00
Merge remote-tracking branch 'origin/master' into ptr_as_ptr
This commit is contained in:
@@ -265,12 +265,14 @@ impl Blob<'_> {
|
||||
|
||||
/// Return the size in bytes of the BLOB.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn size(&self) -> i32 {
|
||||
unsafe { ffi::sqlite3_blob_bytes(self.blob) }
|
||||
}
|
||||
|
||||
/// Return the current size in bytes of the BLOB.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn len(&self) -> usize {
|
||||
use std::convert::TryInto;
|
||||
self.size().try_into().unwrap()
|
||||
@@ -278,6 +280,7 @@ impl Blob<'_> {
|
||||
|
||||
/// Return true if the BLOB is empty.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.size() == 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user