#[repr(C)]pub struct Sqlite3DbHeader {Show 23 fields
pub header_str: [u8; 16],
pub page_size: U16<BigEndian>,
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<BigEndian>,
pub db_size: U32<BigEndian>,
pub freelist_pno: U32<BigEndian>,
pub freelist_len: U32<BigEndian>,
pub schema_cookie: U32<BigEndian>,
pub schema_format_number: U32<BigEndian>,
pub default_cache_size: U32<BigEndian>,
pub largest_root: U32<BigEndian>,
pub text_encoding: U32<BigEndian>,
pub user_version: U32<BigEndian>,
pub incremental_vacuum: U32<BigEndian>,
pub app_id: U32<BigEndian>,
pub replication_index: U64<BigEndian>,
pub version_valid_for: U32<BigEndian>,
pub sqlite_version: U32<BigEndian>,
/* private fields */
}core only.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<BigEndian>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: 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: U32<BigEndian>File change counter.
db_size: U32<BigEndian>Size of the database file in pages. The “in-header database size”.
freelist_pno: U32<BigEndian>Page number of the first freelist trunk page.
freelist_len: U32<BigEndian>Total number of freelist pages.
The schema cookie.
schema_format_number: U32<BigEndian>The schema format number. Supported schema formats are 1, 2, 3, and 4.
default_cache_size: U32<BigEndian>Default page cache size.
largest_root: U32<BigEndian>The page number of the largest root b-tree page when in auto-vacuum or incremental-vacuum modes, or zero otherwise.
text_encoding: U32<BigEndian>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<BigEndian>The “user version” as read and set by the user_version pragma.
incremental_vacuum: U32<BigEndian>True (non-zero) for incremental-vacuum mode. False (zero) otherwise.
app_id: U32<BigEndian>The “Application ID” set by PRAGMA application_id.
replication_index: U64<BigEndian>The replication index of this database, this is a libsql extension, ignored by sqlite3.
version_valid_for: U32<BigEndian>The version-valid-for number.
sqlite_version: U32<BigEndian>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 moreSource§impl FromZeroes for Sqlite3DbHeaderwhere
[u8; 16]: FromZeroes,
U16<BigEndian>: FromZeroes,
u8: FromZeroes,
U32<BigEndian>: FromZeroes,
[u8; 12]: FromZeroes,
U64<BigEndian>: FromZeroes,
impl FromZeroes for Sqlite3DbHeaderwhere
[u8; 16]: FromZeroes,
U16<BigEndian>: FromZeroes,
u8: FromZeroes,
U32<BigEndian>: FromZeroes,
[u8; 12]: FromZeroes,
U64<BigEndian>: 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§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request