Trait sanakirja_core::UnsizedStorable [−][src]
Types that can be stored on disk.
Associated Constants
Loading content...Required methods
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry. If Self::SIZE.is_some()
this must be the same value.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
Implementors
impl UnsizedStorable for ()
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for [u8; 16]
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for [u8]
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
unsafe fn onpage_size(p: *const u8) -> usize
[src]
unsafe fn write_to_page(&self, p: *mut u8)
[src]
impl UnsizedStorable for i8
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for i16
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for i32
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for i64
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for u8
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for u16
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for u32
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
[src]
impl UnsizedStorable for u64
[src]
const ALIGN: usize
[src]
fn size(&self) -> usize
[src]
If Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.
unsafe fn onpage_size(_: *const u8) -> usize
[src]
Read the size from an on-page entry.
unsafe fn write_to_page(&self, p: *mut u8)
[src]
Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).