Trait sanakirja::UnsizedStorable[][src]

pub trait UnsizedStorable: Storable {
    const ALIGN: usize;

    fn size(&self) -> usize;
unsafe fn onpage_size(*const u8) -> usize;
unsafe fn write_to_page(&self, p: *mut u8);
unsafe fn from_raw_ptr<'a, T>(&T, p: *const u8) -> &'a Self; }
Expand description

Types that can be stored on disk.

Associated Constants

Required methods

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry. If Self::SIZE.is_some() this must be the same value.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

Implementations on Foreign Types

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

If Self::SIZE.is_some(), this must return the same value. The default implementation is Self;:SIZE.unwrap().

Read the size from an on-page entry.

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).

Implementors