pub struct DatabaseHeader {Show 22 fields
pub magic: [u8; 16],
pub page_size: PageSize,
pub write_version: RawVersion,
pub read_version: RawVersion,
pub reserved_space: u8,
pub max_embed_frac: u8,
pub min_embed_frac: u8,
pub leaf_frac: u8,
pub change_counter: U32BE,
pub database_size: U32BE,
pub freelist_trunk_page: U32BE,
pub freelist_pages: U32BE,
pub schema_cookie: U32BE,
pub schema_format: U32BE,
pub default_page_cache_size: CacheSize,
pub vacuum_mode_largest_root_page: U32BE,
pub text_encoding: TextEncoding,
pub user_version: I32BE,
pub incremental_vacuum_enabled: U32BE,
pub application_id: I32BE,
pub version_valid_for: U32BE,
pub version_number: U32BE,
/* private fields */
}Expand description
Database Header Format
Fields§
§magic: [u8; 16]b“SQLite format 3\0“
page_size: PageSizePage 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: RawVersionFile format write version. 1 for legacy; 2 for WAL.
read_version: RawVersionFile format read version. 1 for legacy; 2 for WAL.
reserved_space: u8Bytes of unused “reserved” space at the end of each page. Usually 0.
max_embed_frac: u8Maximum embedded payload fraction. Must be 64.
min_embed_frac: u8Minimum embedded payload fraction. Must be 32.
leaf_frac: u8Leaf payload fraction. Must be 32.
change_counter: U32BEFile change counter.
database_size: U32BESize of the database file in pages. The “in-header database size”.
freelist_trunk_page: U32BEPage number of the first freelist trunk page.
freelist_pages: U32BETotal number of freelist pages.
The schema cookie.
schema_format: U32BEThe schema format number. Supported schema formats are 1, 2, 3, and 4.
default_page_cache_size: CacheSizeDefault page cache size.
vacuum_mode_largest_root_page: U32BEThe page number of the largest root b-tree page when in auto-vacuum or incremental-vacuum modes, or zero otherwise.
text_encoding: TextEncodingText encoding.
user_version: I32BEThe “user version” as read and set by the user_version pragma.
incremental_vacuum_enabled: U32BETrue (non-zero) for incremental-vacuum mode. False (zero) otherwise.
application_id: I32BEThe “Application ID” set by PRAGMA application_id.
version_valid_for: U32BEThe version-valid-for number.
version_number: U32BESQLITE_VERSION_NUMBER
Implementations§
Trait Implementations§
Source§impl Clone for DatabaseHeader
impl Clone for DatabaseHeader
Source§fn clone(&self) -> DatabaseHeader
fn clone(&self) -> DatabaseHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DatabaseHeader
Source§impl Debug for DatabaseHeader
impl Debug for DatabaseHeader
Source§impl Default for DatabaseHeader
impl Default for DatabaseHeader
impl Pod for DatabaseHeader
Auto Trait Implementations§
impl Freeze for DatabaseHeader
impl RefUnwindSafe for DatabaseHeader
impl Send for DatabaseHeader
impl Sync for DatabaseHeader
impl Unpin for DatabaseHeader
impl UnsafeUnpin for DatabaseHeader
impl UnwindSafe for DatabaseHeader
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more