Struct libsql_sys::ffi::Sqlite3DbHeader
source · #[repr(C)]pub struct Sqlite3DbHeader {Show 23 fields
pub header_str: [u8; 16],
pub page_size: U16,
pub write_version: u8,
pub read_version: u8,
pub reserved_in_page: u8,
pub max_payload: u8,
pub min_payload: u8,
pub leaf_payload: u8,
pub change_count: U32,
pub db_size: U32,
pub freelist_pno: U32,
pub freelist_len: U32,
pub schema_cookie: U32,
pub schema_format_number: U32,
pub default_cache_size: U32,
pub largest_root: U32,
pub text_encoding: U32,
pub user_version: U32,
pub incremental_vacuum: U32,
pub app_id: U32,
pub replication_index: U64,
pub version_valid_for: U32,
pub sqlite_version: U32,
/* private fields */
}Expand description
Patched database header file, in use by libsql
Fields§
§header_str: [u8; 16]The header string: “SQLite format 3\000”
page_size: U16The database page size in bytes. Must be a power of two between 512 and 32768 inclusive, or the value 1 representing a page size of 65536.
write_version: u8File format write version. 1 for legacy; 2 for WAL.
read_version: u8File format write version. 1 for legacy; 2 for WAL.
reserved_in_page: u8Bytes of unused “reserved” space at the end of each page. Usually 0.
max_payload: u8Maximum embedded payload fraction. Must be 64.
min_payload: u8Minimum embedded payload fraction. Must be 32.
leaf_payload: u8Leaf payload fraction. Must be 32.
change_count: U32File change counter.
db_size: U32Size of the database file in pages. The “in-header database size”.
freelist_pno: U32Page number of the first freelist trunk page.
freelist_len: U32Total number of freelist pages.
The schema cookie.
schema_format_number: U32The schema format number. Supported schema formats are 1, 2, 3, and 4.
default_cache_size: U32Default page cache size.
largest_root: U32The page number of the largest root b-tree page when in auto-vacuum or incremental-vacuum modes, or zero otherwise.
text_encoding: U32The database text encoding. A value of 1 means UTF-8. A value of 2 means UTF-16le. A value of 3 means UTF-16be.
user_version: U32The “user version” as read and set by the user_version pragma.
incremental_vacuum: U32True (non-zero) for incremental-vacuum mode. False (zero) otherwise.
app_id: U32The “Application ID” set by PRAGMA application_id.
replication_index: U64The replication index of this database, this is a libsql extension, ignored by sqlite3.
version_valid_for: U32The version-valid-for number.
sqlite_version: U32SQLITE_VERSION_NUMBER
Trait Implementations§
source§impl AsBytes for Sqlite3DbHeader
impl AsBytes for Sqlite3DbHeader
source§impl Clone for Sqlite3DbHeader
impl Clone for Sqlite3DbHeader
source§fn clone(&self) -> Sqlite3DbHeader
fn clone(&self) -> Sqlite3DbHeader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Sqlite3DbHeader
impl Debug for Sqlite3DbHeader
source§impl FromBytes for Sqlite3DbHeader
impl FromBytes for Sqlite3DbHeader
source§fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>
fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>
source§fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>
fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>
source§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
bytes as a &[Self] with length
equal to count without copying. Read moresource§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
bytes as a &[Self] with length
equal to count without copying. Read moresource§fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>
fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>
source§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [Self], &mut [u8])>
fn mut_slice_from_prefix( bytes: &mut [u8], count: usize, ) -> Option<(&mut [Self], &mut [u8])>
bytes as a &mut [Self] with length
equal to count without copying. Read moresource§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [u8], &mut [Self])>
fn mut_slice_from_suffix( bytes: &mut [u8], count: usize, ) -> Option<(&mut [u8], &mut [Self])>
bytes as a &mut [Self] with length
equal to count without copying. Read moresource§impl FromZeroes for Sqlite3DbHeaderwhere
[u8; 16]: FromZeroes,
U16: FromZeroes,
u8: FromZeroes,
U32: FromZeroes,
[u8; 12]: FromZeroes,
U64: FromZeroes,
impl FromZeroes for Sqlite3DbHeaderwhere
[u8; 16]: FromZeroes,
U16: FromZeroes,
u8: FromZeroes,
U32: FromZeroes,
[u8; 12]: FromZeroes,
U64: FromZeroes,
impl Copy for Sqlite3DbHeader
Auto Trait Implementations§
impl Freeze for Sqlite3DbHeader
impl RefUnwindSafe for Sqlite3DbHeader
impl Send for Sqlite3DbHeader
impl Sync for Sqlite3DbHeader
impl Unpin for Sqlite3DbHeader
impl UnwindSafe for Sqlite3DbHeader
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)