Union sanakirja_core::Slice
source · pub union Slice<'b> {
/* private fields */
}
Implementations§
Trait Implementations§
source§impl<'a> Storable for Slice<'a>
impl<'a> Storable for Slice<'a>
§type PageReferences = Pages
type PageReferences = Pages
An iterator over the offsets to pages contained in this
value. Only values from this crate can generate non-empty
iterators, but combined values (like tuples) must chain the
iterators returned by method
page_offsets
.source§fn page_references(&self) -> Self::PageReferences
fn page_references(&self) -> Self::PageReferences
If this value is an offset to another page at offset
offset
,
return Some(offset)
. Return None
else.source§impl<'b> UnsizedStorable for Slice<'b>
impl<'b> UnsizedStorable for Slice<'b>
const ALIGN: usize = 8usize
source§fn size(&self) -> usize
fn size(&self) -> usize
If
Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
source§unsafe fn onpage_size(p: *const u8) -> usize
unsafe fn onpage_size(p: *const u8) -> usize
Read the size from an on-page entry. If
Self::SIZE.is_some()
this must be the same value.source§unsafe fn write_to_page_alloc<T: AllocPage>(&self, t: &mut T, p: *mut u8)
unsafe fn write_to_page_alloc<T: AllocPage>(&self, t: &mut T, p: *mut u8)
Write to a page. Must not overwrite the allocated size, but
this isn’t checked (which is why it’s unsafe). Read more
source§unsafe fn write_to_page(&self, _: *mut u8)
unsafe fn write_to_page(&self, _: *mut u8)
Write to a page. Must not overwrite the allocated size, but
this isn’t checked (which is why it’s unsafe).
Auto Trait Implementations§
impl<'b> RefUnwindSafe for Slice<'b>
impl<'b> Send for Slice<'b>
impl<'b> Sync for Slice<'b>
impl<'b> Unpin for Slice<'b>
impl<'b> UnwindSafe for Slice<'b>
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