pub struct SqliteHeader {
pub page_size: u32,
pub db_size_pages: u32,
pub first_freelist_page: u32,
pub freelist_page_count: u32,
pub schema_version: u32,
pub schema_format: u8,
pub default_cache_size: i32,
pub text_encoding: TextEncoding,
pub user_version: u32,
pub application_id: u32,
}Expand description
Parsed 100-byte SQLite file header.
Fields§
§page_size: u32Actual page size in bytes (raw value 1 maps to 65536).
db_size_pages: u32Database size in pages (may be 0 for older files; use SqliteReader::page_count).
first_freelist_page: u32Page number of the first trunk page of the freelist (0 if no freelist).
freelist_page_count: u32Total number of free pages in the freelist.
schema_version: u32Schema cookie (incremented on each schema change).
schema_format: u8Schema format number (1–4).
default_cache_size: i32Suggested default cache size in pages (signed).
text_encoding: TextEncodingText encoding used by the database.
user_version: u32User-defined version number (offset 60).
application_id: u32Application ID written by PRAGMA application_id (offset 68).
Value 0x47504B47 (“GPKG”) identifies a GeoPackage file.
Implementations§
Source§impl SqliteHeader
impl SqliteHeader
Sourcepub fn is_geopackage(&self) -> bool
pub fn is_geopackage(&self) -> bool
Returns true if the application_id marks this as a GeoPackage.
Trait Implementations§
Source§impl Clone for SqliteHeader
impl Clone for SqliteHeader
Source§fn clone(&self) -> SqliteHeader
fn clone(&self) -> SqliteHeader
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for SqliteHeader
impl RefUnwindSafe for SqliteHeader
impl Send for SqliteHeader
impl Sync for SqliteHeader
impl Unpin for SqliteHeader
impl UnsafeUnpin 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