Struct sqlite_rs::header::SqliteHeader
source · pub struct SqliteHeader { /* private fields */ }
Expand description
Database File Format
Offset | Size | Description |
---|---|---|
0 | 16 | The header string: “SQLite format 3\000” |
16 | 2 | The database page size in bytes. Must be a power of two between 512 and 32768 inclusive, or the bytes 1 representing a page size of 65536. |
18 | 1 | File format write version. 1 for legacy; 2 for WAL. |
19 | 1 | File format read version. 1 for legacy; 2 for WAL. |
20 | 1 | Bytes of unused “reserved” space at the end of each page. Usually 0. |
21 | 1 | Maximum embedded payload fraction. Must be 64. |
22 | 1 | Minimum embedded payload fraction. Must be 32. |
23 | 1 | Leaf payload fraction. Must be 32. |
24 | 4 | File change counter. |
28 | 4 | Size of the database file in pages. The “in-header database size”. |
32 | 4 | Page number of the first freelist trunk page. |
36 | 4 | Total number of freelist pages. |
40 | 4 | The schema cookie. |
44 | 4 | The schema format number. Supported schema formats are 1, 2, 3, and 4. |
48 | 4 | Default page cache size. |
52 | 4 | The page number of the largest root b-tree page when in auto-vacuum or incremental-vacuum modes, or zero otherwise. |
56 | 4 | The database text encoding. A bytes of 1 means UTF-8. A bytes of 2 means UTF-16le. A bytes of 3 means UTF-16be. |
60 | 4 | The “user version” as read and set by the user_version pragma. |
64 | 4 | True (non-zero) for incremental-vacuum mode. False (zero) otherwise. |
68 | 4 | The “Application ID” set by PRAGMA application_id. |
72 | 20 | Reserved for expansion. Must be zero. |
92 | 4 | The version-valid-for number. |
96 | 4 | SQLITE_VERSION_NUMBER |
Implementations§
source§impl SqliteHeader
impl SqliteHeader
pub fn magic_header_string(&self) -> &MagicHeaderString
pub fn page_size(&self) -> &PageSize
Trait Implementations§
source§impl Debug for SqliteHeader
impl Debug for SqliteHeader
Auto Trait Implementations§
impl RefUnwindSafe for SqliteHeader
impl Send for SqliteHeader
impl Sync for SqliteHeader
impl Unpin for SqliteHeader
impl UnwindSafe for SqliteHeader
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