#[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: U16
The 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: u8
File format write version. 1 for legacy; 2 for WAL.
read_version: u8
File format write version. 1 for legacy; 2 for WAL.
reserved_in_page: u8
Bytes of unused “reserved” space at the end of each page. Usually 0.
max_payload: u8
Maximum embedded payload fraction. Must be 64.
min_payload: u8
Minimum embedded payload fraction. Must be 32.
leaf_payload: u8
Leaf payload fraction. Must be 32.
change_count: U32
File change counter.
db_size: U32
Size of the database file in pages. The “in-header database size”.
freelist_pno: U32
Page number of the first freelist trunk page.
freelist_len: U32
Total number of freelist pages.
The schema cookie.
schema_format_number: U32
The schema format number. Supported schema formats are 1, 2, 3, and 4.
default_cache_size: U32
Default page cache size.
largest_root: U32
The page number of the largest root b-tree page when in auto-vacuum or incremental-vacuum modes, or zero otherwise.
text_encoding: U32
The 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: U32
The “user version” as read and set by the user_version pragma.
incremental_vacuum: U32
True (non-zero) for incremental-vacuum mode. False (zero) otherwise.
app_id: U32
The “Application ID” set by PRAGMA application_id.
replication_index: U64
The replication index of this database, this is a libsql extension, ignored by sqlite3.
version_valid_for: U32
The version-valid-for number.
sqlite_version: U32
SQLITE_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 more